social_auth_tokens
Creates, updates, deletes, gets or lists a social_auth_tokens resource.
Overview​
| Name | social_auth_tokens |
| Type | Resource |
| Id | okta.idps.social_auth_tokens |
Fields​
The following fields are returned by SELECT queries:
- list_social_auth_tokens
The social authentication token object provides the tokens and associated metadata provided by social providers during social authentication.
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for the token (example: NXp9GaX1eOA-XVF_H9fn2Q) |
expiresAt | string (date-time) | Timestamp when the object expires (example: 2016-01-03T18:15:47.000Z) |
scopes | array | The scopes that the token is good for |
token | string | The raw token (example: JBTWGV22G4ZGKV3N) |
tokenAuthScheme | string | The token authentication scheme as defined by the social provider (example: Bearer) |
tokenType | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_social_auth_tokens | select | idpId, userId, subdomain | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
idpId | string | id of IdP |
subdomain | string | (default: my-org) |
userId | string | ID of an existing Okta user |
SELECT examples​
- list_social_auth_tokens
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
;