Skip to main content

social_auth_tokens

Creates, updates, deletes, gets or lists a social_auth_tokens resource.

Overview​

Namesocial_auth_tokens
TypeResource
Idokta.idps.social_auth_tokens

Fields​

The following fields are returned by SELECT queries:

The social authentication token object provides the tokens and associated metadata provided by social providers during social authentication.

NameDatatypeDescription
idstringUnique identifier for the token (example: NXp9GaX1eOA-XVF_H9fn2Q)
expiresAtstring (date-time)Timestamp when the object expires (example: 2016-01-03T18:15:47.000Z)
scopesarrayThe scopes that the token is good for
tokenstringThe raw token (example: JBTWGV22G4ZGKV3N)
tokenAuthSchemestringThe token authentication scheme as defined by the social provider (example: Bearer)
tokenTypestringThe type of token defined by the OAuth Token Exchange Spec (example: urn:ietf:params:oauth:token-type:access_token)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_social_auth_tokensselectidpId, userId, subdomainLists the tokens minted by the social authentication provider when the user authenticates with Okta via Social Auth.

Okta doesn't import all the user information from a social provider. If the app needs information that isn't imported, it can get the user token from this endpoint. Then the app can make an API call to the social provider with the token to request the additional information.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idpIdstringid of IdP
subdomainstring(default: my-org)
userIdstringID of an existing Okta user

SELECT examples​

Lists the tokens minted by the social authentication provider when the user authenticates with Okta via Social Auth.

Okta doesn't import all the user information from a social provider. If the app needs information that isn't imported, it can get the user token from this endpoint. Then the app can make an API call to the social provider with the token to request the additional information.

SELECT
id,
expiresAt,
scopes,
token,
tokenAuthScheme,
tokenType
FROM okta.idps.social_auth_tokens
WHERE idpId = '{{ idpId }}' -- required
AND userId = '{{ userId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;