Troubleshoot OAuth Verify
Trust boundary, validation, token exchange, and “KEYRA succeeded but I’m not logged in.”
On this page
Browser KEYRA success is not an application session. Always POST /verify/validate on your backend before Set-Cookie.
KEYRA says success but my user isn't logged in
Symptom
Popup/redirect completes, but the application has no session.
Most likely causes
- Browser success ≠ application session
- Result never sent to your backend
- /verify/validate never called
- Validate failed
- Backend did not create a session cookie
How to diagnose
- Was the browser result posted to YOUR backend?
- Did validate return valid?
- Did your backend map identity and create a session?
- Was Set-Cookie returned to the browser?
- Browser KEYRA success?
- Was result sent to YOUR backend?
- Was /verify/validate called?
- Did validation succeed?
- Did your backend map the identity?
- Did your backend create a session?
- Was session cookie returned?
How to fix
- Always validate on the server
- Create your own session only after validate succeeds
- See Sessions guide
Related errors: invalid_verification_token, verification_token_already_used, invalid_client
Related SDK: validateVerification(), verifyWithPopup(), handleRedirectCallback()
Related API: POST /verify/validate
Related guides: Server validation, Sessions
Authorization code cannot be exchanged
Symptom
POST /oauth/token fails after hosted success.
Most likely causes
- Code reused
- redirect_uri mismatch
- PKCE mismatch
- Code expired
How to diagnose
- Read invalid_grant error_description.
- Confirm single exchange.
How to fix
- Restart login.
- Align redirect_uri and PKCE.
Related errors: invalid_grant, invalid_client
Related SDK: exchangeAuthorizationCode(), handleRedirectCallback()
Related API: POST /oauth/token
Related guides: Token exchange
Token exchange succeeds but validation fails
Symptom
You have access_token but /verify/validate fails.
Most likely causes
- Wrong client_id on validate
- Token already used
- Forwarded wrong field name / truncated token
How to diagnose
- Inspect valid:false error code.
- Ensure single validate.
How to fix
- Fix client_id.
- New login if already_used.
Related errors: invalid_verification_token, verification_token_already_used, invalid_client
Related SDK: validateVerification()
Related API: POST /verify/validate
Related guides: Server validation
