Retrieve the saved OIDC access tokens and ID tokens for a member. After a successful OIDC login, Stytch will save the issued access token and ID token from the identity provider. If a refresh token has been issued, Stytch will refresh the access token automatically.
Get OIDC Access Token
GET
https://test.stytch.com/v1/b2b/organizations/{organization_id}/members/{member_id}/oidc_providersPath parameters
organization_id* string
member_id* string
Query parameters
include_refresh_token boolean
Response fields
request_id string
status_code int
registrations object
const stytch = require('stytch');
const client = new stytch.B2BClient({
project_id: 'PROJECT_ID',
secret: 'SECRET',
});
const params = {
organization_id: "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
member_id: "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
};
client.organizations.members.oidcProviders(params)
.then(resp => { console.log(resp) })
.catch(err => { console.log(err) });
RESPONSE
200
{
"registrations": [
{
"access_token": "eyJra...",
"access_token_expires_in": 3600,
"connection_id": "oidc-connection-test-123ab123-abab-abab-abab-a123b12baba5",
"id_token": "eyJra...",
"provider_subject": "00uggexxxxxxxxxxxx",
"refresh_token": "q6sof_abcdefghIjklmnopqrstuvwxyz1234567890X",
"scopes": [
"openid",
"email",
"profile",
"groups",
"offline_access"
]
}
],
"request_id": "request-id-test-123ab123-abab-abab-abab-a123b12baba5",
"status_code": 200
}