Skip to content

redeemAuthCode

redeemAuthCode(email: String!, code: String!, passkey: String): SignInResult!

Redeem a 6-digit auth code and sign the user in. Returns the created or signed-in user, the JWT token, and the redirect URL stored on the code. Sets the auth cookie on success — except for codes that were issued with a business pin, which return a business-scoped token without touching the cookie session.

passkey is a finishSignUpPasskey token: a passkey made before the code arrived. It is attached to the account the code signs in to when it was made for the same address, and silently dropped otherwise — the sign-in goes ahead either way.

Arguments

emailString!
codeString!
passkeyString

Returns

SignInResult!

See SignInResult for the full shape.

Try it

Authentication
Example
Query
mutation RedeemAuthCode($email: String!, $code: String!, $passkey: String) {
  redeemAuthCode(email: $email, code: $code, passkey: $passkey) {
    __typename
  }
}
Variables
{}
POST https://go.sessions.website/api/graphql