Access

Sso Callback Redirect

Changed on

Custom SSO callback endpoint that redirects to SuperTokens.

This endpoint:

  1. Accepts clean URL path: /auth/sso/callback/{organization_slug}/{provider_slug}
  2. Validates the organization and provider exist
  3. Builds SuperTokens thirdPartyId: sso:{organization_slug}:{provider_slug}
  4. Redirects to SuperTokens callback: /auth/callback/{thirdPartyId}

SuperTokens then handles:

  1. Exchange code for tokens (using our dynamic provider config)
  2. Get user info
  3. Call our sign_in_up override (creates user_identity, adds user_identities to session)
  4. Redirect to frontend with session cookie
get/auth/sso/callback/{organization_slug}/{provider_slug}

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/auth/sso/callback/{organization_slug}/{provider_slug}
  • Auth
    API key in header Authorization

Path parameters

organization_slugstring required
provider_slugstring required

Response

Successful Response

unknown required

Changes