Validate a magic link token
Exchanges the single-use token from a magic link for a session.
The response depends on whether the environment requires two-factor
authentication. See the EndUserAuthResult schema for the three shapes
and how to branch on them.
Authorizations
The Auth Environment ID for the environment you are authenticating against. Find it in the Portal dashboard under Authentication > Configure.
Body
The single-use token query parameter Portal appended to your
redirect URL.
Response
Token validated successfully
The outcome of a sign-in. Which fields are set depends on whether the environment requires two-factor authentication:
- Two-factor not required.
clientSessionTokenis set,userJwtandtotpLinkarenull. The sign-in is complete. - Two-factor required, user already enrolled.
userJwtis set,clientSessionTokenandtotpLinkarenull. Prompt for a code and callPOST /totps/validations. - Two-factor required, first sign-in.
userJwtandtotpLinkare both set,clientSessionTokenisnull. RendertotpLinkas a QR code for the user to scan, then prompt for a code and callPOST /totps/validations.
Branch on clientSessionToken being non-null to decide whether the
sign-in is finished.
Always null for this endpoint.