Complete an SSO login: exchange the `token` Stytch appended to the login redirect (`stytch_token_type=sso`) for a session.
const url = 'https://api.siteqwality.com/login/sso';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.siteqwality.com/login/sso \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Stytch runs the whole IdP dance, so there is no SAML parsing here. The local user mirror must already exist (created at invite time or by the SCIM webhook); a member without one is refused rather than auto-created, which keeps seat accounting and the account linkage in one place.
Request Body required
Section titled “Request Body required ”Body for POST /login/sso, which completes the SSO redirect.
object
The token query param Stytch appends to the login redirect URL when
stytch_token_type=sso.
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”Authenticated, or MFA required
A session from a login, plus where the frontend should land.
object
Full member info returned on every authentication response.
object
True only when this authentication created a new account.
Sanitized at start; absent on the doors that never take one.
Answer of any login endpoint when the member has confirmed TOTP. The
frontend checks mfa_required before reading an AuthResponse.
object
Always true; the discriminator against AuthResponse.
sqm1_..., valid 10 minutes for 5 attempts.
Example
{ "methods": [ "totp" ]}Invalid SSO token, or no local user for this member
Internal server error