For: a developer who reads an error answer of authtempo and must act on it.
What it does: this page gives one anchor for each code: the status, the meaning, and what the caller does.
- Know which route answered. Routes lists the codes of each route.
A failure answers JSON { "error": "<code>" } with the status of the code. Only hook_refused adds message. A redirect flow sends the browser to /?auth_error=<code> on appURL instead. A new code is a minor version.
ERRORS of @authtempo/core holds these codes. The client package reads the same table.
invalid_body 400
- Meaning: The body, the query, or one of its fields is missing, malformed, or of the wrong type.
- Do: Fix the request. For a form, show the person the field to correct.
| Routes |
POST /reauth, POST /sessions/revoke, POST /user/update, POST /user/change-email, POST /user/change-email/verify, POST /user/delete, POST /multi-session/switch, POST /multi-session/sign-out, GET /username/available, POST /user/username, POST /identities/unlink, POST /magic-link/request, GET /social/:provider/start, POST /social/:provider/link, POST /social/:provider/id-token/nonce, POST /social/:provider/id-token, POST /passkey/register/options, POST /passkey/register/verify, POST /passkey/authenticate/options, POST /passkey/authenticate/verify, POST /passkey/sign-up/options, POST /passkey/sign-up/verify, POST /passkeys/delete, POST /passkeys/rename, POST /password/sign-up, POST /password/sign-in, POST /password/verify/code, POST /password/verify/resend, POST /password/reset/request, POST /password/change, POST /totp/setup, POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, POST /totp/verify, POST /totp/challenge, POST /second-factor/passkey/enable, POST /second-factor/passkey/options, POST /second-factor/disable, POST /second-factor/email/enable, POST /second-factor/email/send, POST /otp/request, POST /otp/verify, POST /otp/reset/request, POST /otp/reset, POST /phone/request, POST /phone/verify, POST /phone/add, POST /phone/add/verify, POST /phone/remove, POST /anonymous/sign-in, POST /anonymous/delete, GET /handoff/start, POST /handoff/redeem, POST /organizations/create, POST /organizations/update, POST /organizations/delete, GET /organizations/members, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, GET /organizations/invitations, GET /organizations/audit, POST /organizations/invitations/revoke, POST /organizations/invitations/accept, POST /organizations/invitations/decline, POST /organizations/has-permission, GET /organizations/permissions, POST /organizations/check-slug, POST /organizations/tokens, GET /organizations/tokens, POST /organizations/tokens/update, POST /organizations/tokens/revoke, POST /organizations/active, GET /organizations/roles, GET /organizations/roles/get, POST /organizations/roles/create, POST /organizations/roles/update, POST /organizations/roles/delete, GET /organizations/teams, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, GET /organizations/teams/members, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, POST /organizations/teams/active, POST /tokens, POST /tokens/revoke, POST /tokens/update, POST /operator/secrets/rewrap, POST /operator/impersonate, POST /operator/impersonate/stop, GET /operator/users, GET /operator/users/search, GET /operator/users/get, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/create, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /operator/sessions/end-all, POST /operator/sso/enforce-off, GET /operator/audit, POST /oauth/grants/revoke, GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/create, POST /sso/connections/update, POST /sso/connections/delete, POST /sso/discover, POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, GET /sso/setup, POST /sso/setup/open, POST /sso/setup/domains/add, POST /sso/setup/domains/verify, POST /sso/setup/connection, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. |
invalid_token 400
- Meaning: A link, a challenge, an invitation, a state, or a code is spent, unknown, or malformed.
- Do: Start the flow again. For a link, ask for a new link.
| Routes |
POST /reauth, GET /user/change-email/confirm, POST /user/change-email/confirm, GET /user/delete/confirm, POST /user/delete/confirm, GET /magic-link/verify, POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /social/:provider/id-token, POST /passkey/register/verify, POST /passkey/authenticate/verify, POST /passkey/sign-up/verify, GET /password/verify, POST /password/verify, GET /password/reset, POST /password/reset, POST /totp/verify, GET /totp/challenge, POST /totp/challenge, POST /second-factor/passkey/options, POST /second-factor/email/send, GET /handoff/continue, POST /handoff/continue, POST /handoff/redeem, POST /organizations/invitations/accept, POST /organizations/invitations/decline, GET /user/invite/confirm, POST /user/invite/confirm. |
token_expired 400
- Meaning: A link, a code, a state, or a challenge is past its life.
- Do: Ask for a new link or start the flow again.
| Routes |
POST /sso/setup/domains/verify, POST /reauth, POST /user/change-email/confirm, POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /passkey/register/verify, POST /passkey/authenticate/verify, POST /passkey/sign-up/verify, POST /password/verify, POST /password/reset, GET /handoff/continue, POST /handoff/continue, POST /handoff/redeem, POST /organizations/invitations/accept, POST /organizations/invitations/decline, POST /sso/domains/verify. |
oauth_denied 400
- Meaning: The provider sent an error, or the person refused at the provider.
- Do: Offer the sign-in again.
oauth_failed 400
- Meaning: The code exchange, the
tokenRequest hook, the ID token, the user info call, or the discovery read failed or took over 10 seconds.
- Do: Check the client id, the secret, and the redirect URI at the provider. Then retry.
email_required 400
- Meaning: The profile of the provider has no address.
- Do: Offer another method, or ask the person to share the address with the app at the provider.
passkey_failed 400
- Meaning: An unknown passkey, a bad signature, or a passkey that is already registered. At a passkey sign-up, the device holds a passkey of an account already.
- Do: Offer another method. At a registration, the device may hold a passkey of the account already.
passkey_unknown 400
- Meaning: The sign-in assertion names a credential that this site does not store. The passkey was deleted, or it belongs to another site.
- Do: Call
PublicKeyCredential.signalUnknownCredential with rpId and the credential id, so the device can remove the passkey. Then offer another method.
username_taken 409
- Meaning: Another account holds this username. Two names that differ only in case are the same name.
- Do: Ask the person for another name.
GET /username/available checks a name before the form is sent.
username_invalid 400
- Meaning: The name breaks a rule. It has a character that is not a letter, a digit, the underscore, or the dot. Or its length is outside the bounds of
username, or the name is reserved.
- Do: Show the rule to the person and ask for another name.
email_unverified 403
- Meaning: The flow needs a verified address, and the user has none. It also comes when the session came before the proof of the address: its
proved flag is false. A claimant’s session gets this answer while a claim runs.
- Do: Send a magic link or the verify mail, so that the person proves the address. A session from before the proof signs in again. The session proof tells the rule.
| Routes |
POST /user/update, POST /user/change-email, POST /user/username, POST /social/:provider/link, POST /passkey/register/options, POST /passkey/register/verify, POST /password/sign-in, POST /password/change, POST /totp/setup, POST /totp/enable, POST /second-factor/passkey/enable, POST /second-factor/email/enable, POST /phone/add, POST /phone/add/verify, POST /organizations/create, POST /organizations/update, POST /organizations/delete, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, POST /organizations/invitations/revoke, POST /organizations/invitations/accept, POST /organizations/check-slug, POST /organizations/tokens, GET /organizations/tokens, POST /organizations/tokens/update, POST /organizations/tokens/revoke, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, POST /tokens, GET /tokens, POST /tokens/revoke, POST /tokens/update, POST /operator/users/platform-role. |
unauthorized 401
- Meaning: The request has no session, or a credential of the wrong kind for the route.
- Do: Sign the person in. A script uses a route that takes an API token.
| Routes |
GET /session, POST /session/refresh, POST /reauth, POST /reauth/passkey/options, POST /reauth/email, GET /sessions, POST /sessions/revoke, POST /sessions/revoke-others, POST /sessions/revoke-all, POST /user/update, POST /user/change-email, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, GET /multi-session, POST /multi-session/switch, POST /multi-session/sign-out, POST /user/username, GET /identities, POST /identities/unlink, POST /social/:provider/link, POST /passkey/register/options, POST /passkey/register/verify, GET /passkeys, POST /passkeys/delete, POST /passkeys/rename, POST /password/change, POST /totp/setup, POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, GET /totp, POST /totp/devices/revoke, POST /second-factor/passkey/enable, POST /second-factor/disable, POST /second-factor/email/enable, POST /phone/add, POST /phone/add/verify, POST /phone/remove, POST /anonymous/delete, POST /organizations/create, GET /organizations, POST /organizations/update, POST /organizations/delete, GET /organizations/members, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, GET /organizations/invitations, GET /organizations/audit, POST /organizations/invitations/revoke, POST /organizations/invitations/accept, POST /organizations/has-permission, GET /organizations/permissions, POST /organizations/check-slug, POST /organizations/tokens, GET /organizations/tokens, POST /organizations/tokens/update, POST /organizations/tokens/revoke, GET /organizations/tokens/current, POST /organizations/active, GET /organizations/roles, GET /organizations/roles/get, POST /organizations/roles/create, POST /organizations/roles/update, POST /organizations/roles/delete, GET /organizations/teams, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, GET /organizations/teams/members, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, POST /organizations/teams/active, GET /organizations/teams/mine, POST /tokens, GET /tokens, POST /tokens/revoke, POST /tokens/update, GET /tokens/current, GET /token, POST /token/live, POST /operator/keys/rotate, GET /operator/secrets/status, POST /operator/secrets/rewrap, GET /operator/info, POST /operator/impersonate, POST /operator/impersonate/stop, GET /operator/users, GET /operator/users/search, GET /operator/users/get, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/create, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /operator/sessions/end-all, POST /operator/sso/enforce-off, GET /operator/audit, POST /oauth/authorize, POST /oauth/device, GET /oauth/grants, POST /oauth/grants/revoke, GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/delete, POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, POST /sso/setup/domains/add, POST /sso/setup/domains/verify, POST /sso/setup/connection, POST /sso/setup/scim-token, POST /sso/setup/handback, GET /sso/setup/status, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. The SSO connection writes POST /sso/connections/create and POST /sso/connections/update also answer it after the body read, when the session ended during the read. |
origin_not_trusted 403
- Meaning: The
Origin header is not baseURL and not in trustedOrigins. Or the request is a form post that the browser marks as not same-origin.
- Do: Add the origin of the app to
trustedOrigins. Post JSON, or post the form from baseURL.
not_found 404
- Meaning: No such route, a feature that the config turns off, or a row that does not belong to the caller. A route that opens a session also answers it when a
session.beforeCreate patch names an organization that the user is not a member of.
- Do: Check the config, the path, and the id.
| Routes |
| Every route of a feature that the config turns off, the routes that read a row by id, and the routes that open a session. |
rate_limited 429
- Meaning: A limit of the flow is full for the key: the address, the IP, or the user.
- Do: Wait for the window to end. Limits lists each window.
| Routes |
POST /reauth, POST /reauth/passkey/options, POST /reauth/email, POST /sessions/revoke, POST /sessions/revoke-others, POST /sessions/revoke-all, POST /user/update, POST /user/change-email, POST /user/change-email/confirm, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, GET /multi-session, POST /multi-session/switch, POST /multi-session/sign-out, GET /username/available, POST /user/username, POST /identities/unlink, POST /magic-link/request, GET /social/:provider/start, POST /social/:provider/link, POST /social/apple/callback, POST /social/:provider/id-token/nonce, POST /social/:provider/id-token, POST /passkey/authenticate/options, POST /passkey/authenticate/verify, POST /passkey/sign-up/options, POST /passkey/sign-up/verify, POST /passkeys/rename, POST /password/sign-up, POST /password/sign-in, POST /password/verify/code, POST /password/verify/resend, POST /password/reset/request, POST /password/reset, POST /password/change, POST /totp/setup, POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, POST /totp/verify, POST /totp/challenge, POST /second-factor/passkey/enable, POST /second-factor/passkey/options, POST /second-factor/disable, POST /second-factor/email/enable, POST /second-factor/email/send, POST /otp/request, POST /otp/verify, POST /otp/reset/request, POST /otp/reset, POST /phone/request, POST /phone/verify, POST /phone/add, POST /phone/add/verify, POST /anonymous/sign-in, POST /anonymous/delete, GET /handoff/start, POST /handoff/redeem, POST /organizations/create, POST /organizations/update, POST /organizations/invite, POST /organizations/invitations/accept, POST /organizations/check-slug, POST /organizations/tokens, GET /organizations/tokens/current, POST /tokens, GET /tokens/current, POST /token/live, POST /operator/keys/rotate, GET /operator/secrets/status, POST /operator/secrets/rewrap, GET /operator/info, POST /operator/impersonate, GET /operator/users, GET /operator/users/search, GET /operator/users/get, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/create, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /operator/sessions/end-all, POST /operator/sso/enforce-off, GET /operator/audit, POST /user/invite/confirm, GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/create, POST /sso/connections/update, POST /sso/connections/delete, POST /sso/discover, GET /sso/:connectionId/start, POST /sso/:connectionId/acs, POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, GET /sso/setup, POST /sso/setup/open, POST /sso/setup/domains/add, POST /sso/setup/domains/verify, POST /sso/setup/connection, POST /sso/setup/scim-token, GET /sso/setup/status, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. |
email_taken_unverified 409
- Meaning: An unverified account holds the address, and this flow did not prove it.
- Do: Offer a magic link or an email code. Either proves the address and claims the account.
forbidden_rank 403
- Meaning: The caller is not a member of the organization, or the rank is too low. On
POST /tokens, the token’s set is wider than the user’s set in the organization.
- Do: Ask a member of a higher rank.
| Routes |
POST /organizations/update, POST /organizations/delete, GET /organizations/members, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, GET /organizations/invitations, GET /organizations/audit, POST /organizations/invitations/revoke, POST /organizations/tokens, GET /organizations/tokens, POST /organizations/tokens/update, POST /organizations/tokens/revoke, POST /organizations/active, GET /organizations/roles, GET /organizations/roles/get, POST /organizations/roles/create, POST /organizations/roles/update, POST /organizations/roles/delete, GET /organizations/teams, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, GET /organizations/teams/members, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, POST /organizations/teams/active, POST /tokens, GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/create, POST /sso/connections/update, POST /sso/connections/delete, POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. The two SSO connection writes answer it before any byte of the body. After the read, they check the caller again. An owner who lost the owner rank gets it then. A platform operator who lost the platform role usually gets 401 unauthorized, because a revoke of the role ends the operator’s sessions. If a removal of the role keeps the session live, the operator gets 403 forbidden_rank. |
slug_reserved 400
- Meaning: The slug is on the reserved list, or the organization is the platform organization.
- Do: Pick another slug.
slug_taken 409
- Meaning: Another organization holds the slug.
- Do: Pick another slug.
last_owner 409
- Meaning: The write would leave the organization with no owner.
- Do: Make another member an owner first.
already_member 409
- Meaning: The user is already a member of the organization, or of the team.
- Do: Change the member’s role instead. For a team, no change is needed.
email_mismatch 403
- Meaning: The invitation is for another address. Or, at the callback of a link, the provider address differs from the account’s address, or the provider did not verify it.
- Do: Sign in with the invited address. For a link, use the provider account of the account’s address, and have the provider verify it.
conflict 409
- Meaning: A write at the same time changed the organization, the member, the stored role, the team, the setup, the account, or the token. On
POST /sso/setup-links/activate, the draft is not the version that the owner read. The link holder changed the draft, a domain, or the pending SCIM token after the preview. Nothing goes live. On POST /sso/setup/domains/add, the domain belongs to the manager or to another link, for example a link that expired before its activation.
- Meaning on D1: A store with a query limit per invocation, such as D1, runs a claim once. When another proof verifies the user first, the flow answers 409 with no claim write. The magic link and the email code spent their proof before the claim. So the flow mails a new one of its kind. That mail counts on the mail limit of its kind for the address. A failure of that mail leaves the 409 and emits the event
claim.mail_failed. The verify link mails nothing, because the address is now verified. A JSON caller gets the 409 with a detail that says to sign in. The form post of the mail link gets a redirect to the app with auth_error=conflict. A social sign-in needs a new sign-in at the provider. The password reset and the invitation confirm keep their link, so the same request can work again.
- Do: Read the row again, and retry.
- On a SCIM route: The code answers 409 in the SCIM error message, with no
scimType. Its detail is “Another request changed this resource at the same time. Send the request again.” A resend can pass, so the directory sends the same request again.
| Routes |
POST /sso/setup-links/activate, POST /sso/setup/domains/add, POST /sso/setup/connection, POST /user/update, POST /user/change-email/confirm, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, POST /identities/unlink, POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /social/:provider/id-token, POST /passkey/authenticate/verify, POST /passkeys/delete, POST /password/sign-up, POST /password/sign-in, POST /password/verify, POST /password/verify/code, POST /password/reset, POST /password/change, POST /totp/setup, POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, POST /totp/verify, POST /totp/challenge, POST /second-factor/passkey/enable, POST /second-factor/disable, POST /second-factor/email/enable, POST /second-factor/email/send, POST /otp/verify, POST /otp/reset, POST /phone/add/verify, POST /phone/remove, POST /anonymous/sign-in, POST /handoff/redeem, POST /organizations/create, POST /organizations/delete, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invitations/accept, POST /organizations/tokens/update, GET /organizations/tokens/current, POST /organizations/roles/update, POST /organizations/teams/delete, POST /organizations/teams/members/add, POST /tokens/update, GET /tokens/current, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /sso/domains/add, POST /sso/domains/update, POST /sso/connections/update, GET /sso/:connectionId/callback, POST /sso/:connectionId/acs. The sign-in routes answer it when an account delete commits during the request. So do the organization create, the member add, the team member add, the accept, and the password reset, POST /user/username, and POST /user/invite/confirm. |
invalid_credentials 401
- Meaning: The address or the password is wrong, or the password row is gone.
- Do: Ask the person to try again, or offer a reset.
sign_up_closed 403
- Meaning:
signUp is false, or it is "invited" and the address has no pending invitation. No user was created.
- Do: Tell the person that this app takes no new accounts, or that an invitation is needed.
| Routes |
POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /social/:provider/id-token, POST /passkey/sign-up/options, POST /passkey/sign-up/verify, POST /password/sign-up, POST /password/reset, POST /otp/verify, POST /otp/reset, POST /phone/verify, POST /anonymous/sign-in, GET /sso/:connectionId/callback, POST /sso/:connectionId/acs. The social callbacks redirect with ?auth_error=sign_up_closed. |
password_policy 400
- Meaning: The password is too short, too long, holds a control character, or equals the address.
- Do: Show the policy, and ask for another password.
password_breached 400
- Meaning:
password.breachCheck answered true for the password.
- Do: Ask for another password.
breach_check_unavailable 503
- Meaning:
password.breachCheck answered "unavailable", so core refused the password. The check fails closed.
- Do: Try again in a few minutes. A reset link stays usable. A reset code is spent, so ask for a new code.
email_taken 409
- Meaning: A verified account, or an account with a password, holds the address. At a change of address: any account holds the new address. At an operator create: any account holds the address.
- Do: Offer the sign-in, or a reset. An operator finds the account with
GET /operator/users/search.
token_limit 409
- Meaning: The user holds 50 API tokens.
- Do: Revoke a token first.
token_exhausted 429
- Meaning: The API token has no calls left in its quota. A refused call spends nothing.
- Do: Wait for the refill of the token, or use another token. The app sets the quota in process.
token_retired 401
- Meaning: The key has a prefix of
tokens.movedPrefixes and no row, or its row is retired. The key never acts.
- Do: Make a new token in the app, and replace the old key.
organization_token_limit 409
- Meaning: The organization holds 50 live organization tokens.
- Do: Revoke a token of the organization first.
hook_refused 403
- Meaning: A before hook of the app threw
hookRefusal(message). The body carries message. With hooks.request.before, each route can answer it.
- Do: Show
message to the person.
| Routes |
POST /user/update, POST /user/change-email/confirm, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, POST /user/username, POST /identities/unlink, POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /social/:provider/id-token, POST /passkey/authenticate/verify, POST /passkey/sign-up/verify, POST /password/sign-up, POST /password/sign-in, POST /password/verify, POST /password/verify/code, POST /password/reset, POST /totp/verify, POST /totp/challenge, POST /otp/verify, POST /otp/reset, POST /phone/verify, POST /phone/add/verify, POST /phone/remove, POST /anonymous/sign-in, POST /anonymous/delete, POST /handoff/redeem, POST /organizations/create, POST /organizations/update, POST /organizations/delete, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, POST /organizations/invitations/accept, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, POST /operator/impersonate, POST /operator/impersonate/stop, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/create, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /operator/sessions/end-all, POST /operator/sso/enforce-off, POST /user/invite/confirm, GET /sso/:connectionId/callback, POST /sso/:connectionId/acs. |
hook_failed 500
- Meaning: A before hook threw another error, a session patch was wrong, or
jwtMint.claims failed. With hooks.request.before, each route can answer it.
- Do: Read the log line of the hook, and fix the hook.
| Routes |
POST /user/update, POST /user/change-email/confirm, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, POST /user/username, POST /identities/unlink, POST /magic-link/verify, GET /social/:provider/callback, POST /social/apple/callback, POST /social/:provider/id-token, POST /passkey/authenticate/verify, POST /passkey/sign-up/verify, POST /password/sign-up, POST /password/sign-in, POST /password/verify, POST /password/verify/code, POST /password/reset, POST /totp/verify, POST /totp/challenge, POST /otp/verify, POST /otp/reset, POST /phone/verify, POST /phone/add/verify, POST /phone/remove, POST /anonymous/sign-in, POST /anonymous/delete, POST /handoff/redeem, POST /organizations/create, POST /organizations/update, POST /organizations/delete, POST /organizations/members/add, POST /organizations/members/role, POST /organizations/members/remove, POST /organizations/invite, POST /organizations/invitations/accept, POST /organizations/teams/create, POST /organizations/teams/update, POST /organizations/teams/delete, POST /organizations/teams/members/add, POST /organizations/teams/members/remove, GET /token, POST /operator/impersonate, POST /operator/impersonate/stop, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create-admin, POST /operator/users/create, POST /operator/users/update, POST /operator/users/delete, POST /operator/sessions/end-user, POST /operator/sessions/end-all, POST /operator/sso/enforce-off, POST /user/invite/confirm, GET /sso/:connectionId/callback, POST /sso/:connectionId/acs. |
internal 500
- Meaning: A route had an unhandled error. The server wrote one log line with the route.
- Do: Read the log line, and report the error. Try the request again later.
organization_limit 409
- Meaning: The user holds
organizations.limits.perUser memberships.
- Do: Leave an organization first.
member_limit 409
- Meaning: The organization holds
organizations.limits.membersPerOrganization members. The invitation stays pending.
- Do: Remove a member first.
invitation_limit 409
- Meaning: The organization holds
organizations.limits.pendingInvitationsPerOrganization pending invitations.
- Do: Revoke an invitation first.
invalid_code 400
- Meaning: An email code or a second factor code is wrong, expired, spent, or unknown.
- Do: Ask the person to type the code again.
| Routes |
POST /reauth, POST /user/change-email/verify, POST /password/verify/code, POST /totp/setup, POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, POST /totp/verify, POST /totp/challenge, POST /otp/verify, POST /otp/reset, POST /phone/verify, POST /phone/add/verify. |
too_many_attempts 400
- Meaning: The code or the challenge took its last wrong guess, and core spent it.
- Do: Request a new code, or sign in again.
totp_enabled 409
- Meaning: The second factor is already on for the user.
- Do: Turn it off first, then set it up again.
totp_not_enabled 400
- Meaning: The second factor is off, or its setup is older than 15 minutes.
- Do: Run the setup again.
second_factor_last_method 409
- Meaning: The passkey is the last passkey of the user, and the passkey is a second-factor method.
- Do: Turn the passkey method off first, or register another passkey.
captcha_required 400
- Meaning: The flow has a captcha, and the request has no
x-captcha-response header.
- Do: Show the widget, and send its token in the header.
captcha_failed 403
- Meaning: The captcha refused the token, or the token is longer than 2048 characters. A token passes once.
- Do: Show the widget again, and send its new token.
captcha_unavailable 503
- Meaning: The captcha gave no answer, and
captcha.onUnavailable is "refuse".
- Do: Try again later.
phone_invalid 400
- Meaning: The phone number is not in E.164 form. That form is a plus sign and 8 to 15 digits, with no leading zero.
- Do: Ask for the number again with the plus sign and the country code, and with no space.
phone_region 400
- Meaning: The number is outside every prefix of
phone.regions. No SMS was sent.
- Do: Tell the person that this app sends no code to numbers of that country, and offer another method.
sms_unavailable 503
- Meaning: The SMS port of the app answered
"unavailable" or threw. The code counted against phone.dailyCap. Only api.phone.request and api.phone.add in process answer it. POST /phone/request and POST /phone/add send after the answer, and an outage gives an sms.not_sent line.
- Do: Try again later, or offer another method.
phone_taken 409
- Meaning: Another account set this phone number first. The unique key of the number decided a race. The code of this request stays live.
- Do: Tell the person that another account has the number. To move the number, that account must remove it first. At an operator create, an account holds the number, and nothing was written.
host_not_allowed 421
- Meaning:
baseURL is a list, and the origin of the request is not one of its entries. The scheme, the host, and the port must each be equal. No handler ran. Core reads no x-forwarded-host or forwarded header.
- Do: Add the origin to the
baseURL list, or send the request to an origin of the list. Behind a proxy on Node, build request.url from the host that the proxy checked.
| Routes |
Every route, and auth.wellKnown, while baseURL is a list. See the base URL list. |
client_ip_missing 403
- Meaning:
limits.noClientIp is refuse, and clientIp gave no IP for the request. No handler ran, and no limit counted the request.
- Do: Send the request through the proxy that sets the client IP. If the proxy did send it, correct
clientIp so that it reads the header of that proxy.
body_too_large 413
- Meaning: The request body is longer than the cap of its route. Core stopped the read at the cap, so no handler parsed the body. A false or absent
content-length does not change the count. The cap is 65536 bytes, 262144 bytes for POST /social/apple/callback, 4194304 bytes for POST /sso/setup/connection, and 8388608 bytes for the two SSO connection writes. The router answers it for every route that reads a body.
- Do: Send a smaller body. Each cap is the next power of two above the largest valid body of its route. A client that gets this code sends a wrong body. An SSO connection write whose read ran more than 8 s before this code spends the rest of the window of
sso-large-read:user.
| Routes |
| Every route with a body, except the SCIM routes, which answer their own SCIM 413 past 1 MiB. See Limits. |
body_busy 503
- Meaning: The body reads of the routes with a cap above 65536 bytes hold at most 16777216 bytes in this isolate, in two halves. Now the reads of signed-in users hold their half, 8388608 bytes, or the other reads hold theirs, 8388608 bytes. Or the reads of one client hold its share: 4194304 bytes for an IP, or the cap of the read for a user. Or the user runs another large read: a user runs one at a time. A client is its IP before a session and its user after one. Core stopped the read, so no handler parsed the body. The answer carries
Retry-After: 1.
- Do: Send the request again after the seconds of
Retry-After. An SSO connection write with a declared length that cannot start gets this code before any count of its user. A write with no length counts at its start, and can then get this code at its first chunk. A write that gets this code in the middle of its read has counted too. A write whose read ran more than 8 s before this code spends the rest of the window of sso-large-read:user. A burst of large bodies at once gets this code. A body at the floor of 65536 bytes never gets it.
| Routes |
POST /social/apple/callback, POST /sso/connections/create, POST /sso/connections/update, POST /sso/setup/connection, and POST /sso/:connectionId/acs. The SCIM routes answer their own SCIM 503. See Limits. |
body_timeout 408
- Meaning: A body read of a route with a cap above the floor stopped at a deadline. It got no bytes for 10 s, or it ran past the time of its cap at 131072 bytes per second. For a signed-in user, the rate is 262144 bytes per second. That time is at least 10 s. Core freed the bytes of the read, so no handler parsed the body.
- Do: Send the whole body again, with no pause. A link slower than 128 KiB per second, or 256 KiB per second for a signed-in user, can get this code for a large body. An SSO connection write that gets this code spends the rest of the large reads of its user in the window of
sso-large-read:user. So does such a write whose read ran more than 8 s and then ended in another way. The read can end whole, at a 413 past its cap, at a 503 body_busy, or at a closed socket. The spend lands in the window in which the read ends. So a read that ends after its window ended fills the next window. Until that window ends, up to 1 hour from the end of that read, both SSO connection writes of the user answer 429 rate_limited. Send it again in the next window, on a faster link. A body at the floor never gets it.
| Routes |
POST /social/apple/callback, POST /sso/connections/create, POST /sso/connections/update, POST /sso/setup/connection, and POST /sso/:connectionId/acs. The SCIM routes answer their own SCIM 408. See Limits. |
anonymous_refused 403
- Meaning: An anonymous session called a route that needs a way in, or that would change the anonymous user in place. At
POST /anonymous/delete, a session that is not anonymous called it. The route did nothing.
- Do: Ask the person to sign in or to create an account first. The sign-in replaces the anonymous user. To delete an anonymous user, call
POST /anonymous/delete.
| Routes |
POST /reauth, POST /reauth/passkey/options, POST /reauth/email, POST /user/update, POST /user/change-email, POST /user/change-email/verify, POST /user/delete, POST /user/delete/confirm, POST /user/username, POST /social/:provider/link, POST /passkey/register/options, POST /passkey/register/verify, POST /password/change, POST /totp/setup, POST /totp/enable, POST /second-factor/passkey/enable, POST /second-factor/passkey/options, POST /second-factor/email/enable, POST /phone/add, POST /phone/add/verify, POST /anonymous/delete, POST /organizations/create, POST /organizations/invitations/accept, POST /tokens, POST /oauth/authorize, POST /oauth/device. |
session_not_fresh 403
- Meaning: The change needs a session that a sign-in or a re-authentication proved within
session.freshMinutes.
- Do: Re-authenticate at
POST /reauth, then send the change again. The session token stays the same.
| Routes |
POST /sessions/revoke-all, POST /user/username, POST /phone/add, POST /phone/add/verify, POST /phone/remove, POST /organizations/members/remove, POST /organizations/tokens, POST /organizations/tokens/update, POST /organizations/roles/create, POST /organizations/roles/update, POST /organizations/roles/delete, GET /sso/domains, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/update, POST /sso/connections/delete, POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. POST /reauth makes the session fresh. The account routes POST /sessions/revoke, POST /sessions/revoke-others, POST /user/change-email, POST /identities/unlink, POST /social/:provider/link, and POST /user/delete need a fresh session. So do the passkey and token routes POST /passkey/register/options, POST /passkeys/delete, POST /tokens, and POST /tokens/update. So do the factor routes POST /totp/enable, POST /totp/disable, POST /totp/backup-codes, POST /second-factor/passkey/enable, POST /second-factor/email/enable, and POST /second-factor/disable. POST /password/change needs one for a first password, and while the second factor is on. An owner needs one at each SSO manager route, such as POST /sso/connections/create and POST /sso/domains/add. |
last_credential 409
- Meaning: The removal would leave the account with no way to sign in. A password counts only while a sign-in reaches it. That is by an address, by a username while
username is on, or by a phone that signs in.
- Do: Add another way in first: a passkey, a provider, a verified address, a phone, or a password with one of those identifiers. Then remove this one.
identity_taken 409
- Meaning: Another account holds the provider account. Core never moves an identity between accounts.
- Do: Sign in to the other account, and unlink the provider there. Then link it here.
sole_owner 409
- Meaning: The account is the last owner of an organization with other members, or of the platform organization.
- Do: Make another member an owner with
POST /organizations/members/role, then delete the account again.
delete_too_large 409
- Meaning: The delete does not fit one request, so it changes nothing. An account delete answers it when the account is the only member of more than 50 organizations. An organization delete answers it when the organization has more than 500 SCIM Groups. The operator delete of an account answers it for the same count of organizations, on every store. D1 allows 50 queries per invocation on Workers Free. There the self delete and the operator delete also answer it when their least work cannot fit that budget (plan 12f2). The solo organizations cost 6 calls for any count. Each organization that the user owns with another owner costs 2 calls, and 1 more call counts the owners of all of them. A plain membership costs none. The self delete also writes the leave rows of all the organizations that the user leaves in 1 more call, plain memberships too. The operator delete writes no leave row. So on D1 a secret with the scope
delete takes 1 solo organization and at most 4 such organizations. A platform operator has the smallest budget: 1 solo organization and none of them, or no solo organization and at most 2. The self delete of a person with 1 to 50 solo organizations takes at most 2 such organizations, and the mailed confirm at most 2. With no solo organization, the self delete takes at most 5, and the mailed confirm at most 5. A store tells such a limit with queryLimitPerInvocation; Postgres, MySQL, SQLite, and memory have none. A storage whose user delete cascades, such as each storage of the compatibility package, has a second cause. There an account delete answers it when the user has more than 100 live impersonation sessions, with the impersonation tool on.
- Do: For an account, delete those organizations with
POST /organizations/delete first. For an organization, let the directory delete some groups first. For a self delete or an operator delete on D1, let the user leave each organization that the user owns with another owner. Or delete the account with a secret that holds the scope delete. For an account with more than 100 live impersonation sessions, call api.operator.sessions.endUser until more is false, or wait until those sessions expire. Then send the delete again.
account_banned 403
- Meaning: An operator banned the account. Only a person who proved the credential gets this code.
- Do: Tell the person to contact support. Do not try again.
| Routes |
POST /social/:provider/id-token, POST /password/verify/code, POST /phone/verify, GET /sso/:connectionId/callback, POST /sso/:connectionId/acs. The sign-in routes answer it after the credential check: POST /password/sign-in, POST /password/verify, POST /password/reset, POST /otp/verify, POST /otp/reset, POST /magic-link/verify, POST /passkey/authenticate/verify, GET /social/:provider/callback, POST /social/apple/callback. A race with the ban can reach it at POST /handoff/redeem, POST /totp/verify, POST /totp/challenge. The operator tools POST /operator/users/platform-role and POST /operator/users/create-admin refuse a banned target. POST /user/invite/confirm answers it after the token check. |
operator_required 403
- Meaning: The caller is not an operator for this action. The operator secret has no scope for the route, or the session fails the operator user guard. The code does not tell which step failed.
- Do: Use a secret with the scope of the route. A platform operator verifies the address, turns a second factor on, and re-authenticates.
| Routes |
POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, POST /operator/impersonate, POST /operator/sso/enforce-off, GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/create, POST /sso/connections/update, POST /sso/connections/delete, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. POST /operator/keys/rotate needs the scope keys. GET /operator/secrets/status and POST /operator/secrets/rewrap need the scope secrets. The operator user tools need the scope users, sessions, or audit, or a platform operator who passes the guard. These routes are GET /operator/users, GET /operator/users/search, GET /operator/users/get, POST /operator/users/ban, POST /operator/users/unban, POST /operator/users/platform-role, POST /operator/users/second-factor/disable, POST /operator/users/create, POST /operator/users/update, POST /operator/sessions/end-user, POST /operator/sessions/end-all, and GET /operator/audit. POST /operator/users/delete needs the scope delete. POST /operator/users/create-admin takes a secret only. |
operator_self 409
- Meaning: A platform operator tried to act on their own account. An act on another platform operator answers
operator_required.
- Do: Ask another operator, or use an operator secret.
impersonation_refused 403
- Meaning: The target of an impersonation is the operator, a platform operator, banned, or absent. One code answers each case.
- Do: Check the user id. An operator cannot impersonate a platform operator.
impersonation_session 403
- Meaning: An impersonation session cannot reach this route. The router answers it before the handler, so the route changes nothing.
- Do: Stop the impersonation with
POST /operator/impersonate/stop, and do the action from the operator’s own session, or ask the user to do it.
| Routes |
| The Errors cell of each route on the routes page names it. It covers the sign-out, the re-authentication, and every operator route but the stop. It covers each change of a way in, the second-factor routes, and the handoff. It covers the organization writes that give or take a role, and the OAuth authorize, consent, and end-session routes. The in-process calls of the same acts answer it too. It also covers the stored role writes and the token writes of plan 12k. Their in-process calls do not answer it: such a call is the app’s own act. |
domain_unverified 400
- Meaning: A resolver of
sso.dns did not give the value of the TXT record. Every resolver must give it. A resolver that answers nothing in 10 seconds counts as a refusal.
- Do: Publish the record of the add answer at
_authtempo-challenge.<domain>, wait for the DNS to show it, then send the verify again.
domain_taken 409
- Meaning: Another organization holds the verified domain. One domain belongs to one organization.
- Do: Ask the other organization to delete its domain, then send the verify again.
domain_limit 409
- Meaning: The organization holds
sso.limits.domainsPerOrganization domains, pending and verified, 20 by default.
- Do: Delete a domain that the organization does not use, or raise the limit in the config.
connection_limit 409
- Meaning: The organization holds
sso.limits.connectionsPerOrganization SSO connections, 10 by default.
- Do: Delete a connection that the organization does not use, or raise the limit in the config.
second_factor_required 403
- Meaning: The owner of the organization has no second factor. An owner manages the SSO setup only with a second factor on.
- Do: Turn on a second factor, such as TOTP at
POST /totp/enable, then send the request again with a fresh session.
| Routes |
POST /sso/setup-links/create, GET /sso/setup-links/list, GET /sso/setup-links/get, POST /sso/setup-links/revoke, POST /sso/setup-links/activate, GET /scim/tokens, POST /scim/tokens/create, POST /scim/tokens/revoke. The SSO manager routes of an owner: GET /sso/domains, POST /sso/domains/add, POST /sso/domains/verify, POST /sso/domains/update, POST /sso/domains/delete, GET /sso/connections, POST /sso/connections/create, POST /sso/connections/update, and POST /sso/connections/delete. The two connection writes answer it before any byte of the body. |
sso_failed 400
- Meaning: An SSO sign-in failed at one step. For OIDC, the step is the state, the binding cookie, the discovery document, the code exchange, the ID token, or the nonce. For SAML, the step is a check of the Response, such as
wrapping, signature, audience, or replay. The log line authtempo: sso failed names the connection id and the step.
- Do: Start the sign-in again. If it fails again, check the issuer, the client id, and the client secret of the connection.
- Meaning: No enabled connection can sign in the person. The connection does not exist, it is off, or its kind is off. The discovery found no connection for the address.
- Do: Sign in another way, or ask the organization owner to route the domain to an enabled connection.
setup_link_invalid 404
- Meaning: The setup link is unknown, expired, revoked, or ended. All four cases give one code and one body, so an answer tells nothing about the link.
- Do: Ask the owner of the organization for a new setup link.
setup_link_limit 409
- Meaning: The organization holds its limit of 2 live setup links.
- Do: Revoke a setup link that the organization does not use, then mint the new link again.
setup_not_tested 409
- Meaning: No test run passed for the current version of the draft connection. The connection update also answers it for
enabled: true on a draft: only the activation of the link turns on a draft.
- Do: Ask the person who set up the link to run the test sign-in of the draft again, then activate the setup link. A change to a domain or to the pending SCIM token also needs a new test run.
sso_required 403
- Meaning: The address is in a verified domain whose owner turned
enforce on, so only SSO signs it in. The body holds detail, the SSO start URL: an absolute URL on the origin of baseURL. A social callback carries the code in the auth_error query parameter of the redirect.
- Do: Send the person to
detail to sign in through the organization’s provider. The magic link, email code, and reset requests of such an address send no mail and answer as usual. A phone code request for the number of such an account sends no SMS and answers as usual. A link, a code, or a second factor challenge from before enforce went on opens no session either. An operator create of such an address writes no invitation link, mails nothing, and answers mailed: null.
| Routes |
POST /password/sign-in, POST /password/sign-up, POST /password/change, POST /magic-link/verify, POST /otp/verify, GET /social/:provider/callback, POST /social/apple/callback, and POST /passkey/authenticate/verify, POST /password/verify, POST /password/reset, POST /otp/reset, POST /totp/verify, POST /totp/challenge, POST /social/:provider/id-token, POST /password/verify/code, POST /phone/verify, and POST /user/invite/confirm. |
sso_domain_mismatch 403
- Meaning: The provider of the connection gave an address that no verified domain of the connection’s organization claims. Or the identity of the sign-in names a user whose current address no such domain claims. Core never reads the
email_verified of the provider: only the organization’s DNS proof makes an address true.
- Do: Ask the organization owner to verify the domain of the address, or to fix the address at the provider. A user who moved the account address out of the domain signs in another way.
sso_not_provisioned 403
- Meaning: The connection has
jit off, and no user has the address. The sign-in creates no user.
- Do: Ask the organization to create the account first, for example through its directory.
account_disabled 403
- Meaning: The organization’s directory turned the user off through SCIM, so the SSO sign-in of that organization refuses the user.
- Do: Ask the organization to turn the account on again in its directory.
role_not_found 409
- Meaning: The connection gives new members a role that the organization no longer has, so the sign-in adds no member row and writes nothing.
- Do: Ask the organization owner to set the connection’s
defaultRole to a role that exists.
role_in_use 409
- Meaning: A member of the organization or a pending invitation holds the role name, alone or as a part of its role string. A delete of the role, or a create of a role with that name, answers this code.
- Do: Give each member another role with
POST /organizations/members/role, revoke the invitations, then send the request again.
role_limit 409
- Meaning: The organization holds
organizations.dynamicRoles.maxPerOrganization stored roles, 50 by default.
- Do: Delete a role that no member holds, or raise the limit in the config.
role_taken 409
statement_not_grantable 400
- Meaning: The
permissions of a stored role name audit. A stored role never holds it, also when the owner writes it. The audit shows the IP and the user agent of each member, so only the owner rank reads it.
- Do: Remove
audit from permissions, then send the request again. In the roles form, list audit:read in a role of the config.
team_limit 409
- Meaning: The organization holds
organizations.limits.teamsPerOrganization teams.
- Do: Delete a team, or raise the limit in the config.
team_member_limit 409
- Meaning: The team holds
organizations.limits.membersPerTeam members. At an accept, the invitation stays pending, and the person joins nothing.
- Do: Remove a member from the team, or raise the limit in the config. Then add the person or accept again.
last_team 409
- Meaning: The team is the last team of the organization, and
organizations.teams.keepLastTeam is on.
- Do: Create another team first, then delete this one.
not_ready 503
- Meaning: The store gave no answer to the readiness check. The body also carries
reason. It is storage when the store threw or gave no answer in 3 seconds. It is schema when the stored schema version is older than the adapter. It names no host, no database, no version, and no error name.
- Do: For
schema, run the migrations of your adapter. For storage, check the database and its binding. The route keeps one result for 10 seconds, so call it again after that time.
| Routes |
GET /ready, when the config sets observe.readiness: true. |
OAUTH_ERRORS of @authtempo/core holds these codes. The provider routes answer them, because an OAuth client reads these strings. invalid_token and rate_limited are in both tables, so an OAuth anchor has the prefix oauth-.
invalid_request 400
- Meaning: A parameter is missing, repeated, or wrong, or the held request is unknown, spent, or older than 10 minutes.
- Do: Fix the request, or start the authorize step again.
invalid_client 400 or 401
- Meaning: The
client_id is unknown, or its metadata document failed. At the token, revoke, introspection, and device authorization routes, the client auth failed. At the introspection route, the caller is also not a confidential client with introspect: true. The secret is wrong, or a confidential client sent no secret, or a public client sent one. A private_key_jwt client sent a secret, or its client assertion failed a check of RFC 7523. At those routes a request with an Authorization header gets the 401 with WWW-Authenticate: Basic and the issuer as the realm. A request with no header gets a 400 with no challenge, so a browser shows no sign-in dialog.
- Do: Register the client again, or fix its metadata document. Send the secret as HTTP Basic or as
client_secret in the form, and send one method only.
invalid_grant 400
- Meaning: The code or the refresh token is spent, expired, of another client, or its verifier does not match. A refresh token whose grant keeps no scope of the config but
offline_access is refused too. A code with no challenge takes no verifier. A reused refresh token deletes its family. A device code is spent, of another client, or unknown.
- Do: Start the authorize step again.
unsupported_grant_type 400
- Meaning: The
grant_type is not authorization_code, refresh_token, client_credentials, or, with oauth.device on, the device grant urn:ietf:params:oauth:grant-type:device_code.
- Do: Use a grant type that the server serves.
invalid_scope 400
- Meaning: A scope is unknown, the list is empty, or a refresh asks for more than the grant. A
client_credentials request asks for a scope that is not in both the client’s credentialsScopes and oauth.scopes, or no such scope is left.
- Do: Ask for known scopes only.
invalid_target 400
- Meaning: The
resource is not one of oauth.resources, or not the grant’s resource. An authorize request, a client_credentials request, or a device start has no resource while oauth.defaultResource is not set. An empty resource counts as none.
- Do: Send the resource of the grant.
unsupported_response_type 400
- Meaning: The
response_type is not code.
- Do: Send
response_type=code.
access_denied 400
- Meaning: The person refused, or the user has no verified address. At the token route, the person denied the device code (RFC 8628 section 3.5).
- Do: Show that access was refused. A device stops its poll.
login_required 400
- Meaning:
prompt=none, and the person must sign in: no session, or a sign-in older than max_age.
- Do: Send the person through the authorize step with no
prompt.
consent_required 400
- Meaning:
prompt=none, and no consent covers the scopes.
- Do: Send the person through the authorize step with no
prompt.
request_not_supported 400
- Meaning: The authorize request has a
request parameter. Core takes no request object (OIDC Core 3.1.2.6).
- Do: Send the parameters in the query.
request_uri_not_supported 400
- Meaning: The authorize request has a
request_uri parameter. Core takes no request URI (OIDC Core 3.1.2.6).
- Do: Send the parameters in the query.
registration_not_supported 400
- Meaning: The authorize request has a
registration parameter. Core takes no client data in the request (OIDC Core 3.1.2.6).
- Do: Register the client first, then send its
client_id.
invalid_redirect_uri 400
- Meaning: A redirect URI at registration is not https, a loopback http URL, or a private-use scheme.
- Do: Register a redirect URI of an allowed form.
- Meaning: The registration metadata is malformed, or names an auth method, a grant type, or a response type that core does not serve. A pairwise client has no single sector, or a key field breaks its rule.
api.oauth.clients answers this code for the same fields.
- Do: Fix the field. A metadata document drops a member that core does not serve, so only a broken rule refuses it.
invalid_token 401
- Meaning: The bearer of the userinfo route is not a live access token of this instance, or it is a DPoP-bound token. Under the
DPoP scheme, the token is not bound. At the register route, the bearer is not the initial access token.
- Do: Refresh the access token. Send a bound token as
Authorization: DPoP with a new proof. At the register route, send the initial access token that the app gave you.
insufficient_scope 403
- Meaning: The access token of the userinfo route has no
openid scope.
- Do: Ask for
openid at the authorize step.
invalid_dpop_proof 400
- Meaning: The
DPoP header of a token request fails a check of RFC 9449 section 4.3, or its jti was spent. Or a client of dpop_bound_access_tokens sent no proof. Or the code, the refresh token, or the device code is bound to another key. At userinfo, a bound token came with no valid proof of its key. The status there is 401, with the DPoP challenge (RFC 9449 section 7.1).
- Do: Sign a new proof for each request, with
htm, htu, a fresh iat, and a new jti. Use the key that the code or the refresh token is bound to.
authorization_pending 400
- Meaning: The person has not yet approved or denied the device code (RFC 8628 section 3.5).
- Do: Poll again after
interval seconds.
slow_down 400
- Meaning: The device polled within
interval seconds of its last poll. The interval of the code grows by 5 seconds (RFC 8628 section 3.5).
- Do: Add 5 seconds to the interval, for this poll and every later one.
expired_token 400
- Meaning: The device code expired, and its device authorization ended (RFC 8628 section 3.5).
- Do: Stop the poll. Start a new device authorization when the person asks for it.
rate_limited 429
- Meaning: A limit of the provider is full: register, authorize, or token for the IP, or introspection for the IP or the client. Or a device limit is full: the device request for the IP, or the device page for the session, the IP, or one code. A
GET /oauth/device with no session counts as an authorize request.
- Do: Wait for the window to end.
| Routes |
POST /oauth/register, GET /oauth/authorize, POST /oauth/authorize, POST /oauth/token, POST /oauth/revoke, POST /oauth/introspect, POST /oauth/device_authorization, GET /oauth/device, POST /oauth/device, GET /oauth/end-session, POST /oauth/end-session. |
unauthorized_client 400
- Meaning: A revoke named a
client_id that is not the client of the refresh token. Nothing is revoked. Or a client_credentials request came from a public client, or from a client whose grantTypes do not hold the grant. A device request or poll came from a client without the device grant, or from a pairwise client. An authorize request or a code exchange came from a client whose grantTypes lack authorization_code. A refresh came from a client whose grantTypes lack refresh_token.
- Do: Revoke with the client id of the token, or with no client id. For
client_credentials, use a confidential client of api.oauth.clients with the grant. For another grant, add it to the client’s grantTypes.
STORAGE_ERROR_CODES of @authtempo/core/errors holds these codes. A storage adapter throws StorageError with one of them. No route answers a storage code. A storage error that no handler catches answers 500 internal.
unique_violation
- Meaning: A unique key refused a write, because a row with the same key exists.
- Do: In an adapter, throw it for each unique key of the schema. The engine reads it as a lost race.
unknown_model
- Meaning: A call names a model that
schema of @authtempo/core does not have.
- Do: Use a model name of
schema.
unknown_field
- Meaning: A call names a field that the model does not have.
- Do: Use a field name of the model in
schema.
invalid_argument
- Meaning: The port refuses a value or a clause. Examples are an empty
where on update or delete, and a NUL or a lone surrogate in a where value.
- Meaning on MySQL: A string is longer than its column, or a value on an ascii column is not printable ASCII. Length bounds lists each column.
- Do: Fix the call. Write a storage adapter lists the rules of the port.
schema_mismatch
- Meaning: The
schema_version in ta_meta is older than SCHEMA_VERSION of core, or the database has no ta_meta. Every operation throws it until the migrations run.
- Do: Run the migrations of the adapter, or authtempo migrate. Then the next operation reads the version again.
rollback_failed
- Meaning: A D1 or SQLite rollback could not undo every write of the transaction. Its
cause holds { original, failures }.
- Do: Read
cause. Check the rows that the transaction wrote, because some of them stay.
config_mismatch
- Meaning: The database or the driver handle has a setting that breaks the rules of the port. The message names the setting, never a value.
- Do: Change the setting. SQLite lists the driver settings, and MySQL lists the server settings.
- The router answers 500
{ "error": "internal" } for an error that no handler caught. It writes the log line authtempo: unhandled error <method> <path> <error name>.
- The client package adds
network, unexpected, and cancelled. The client package tells when each appears.
- The handoff package adds
redirect_mismatch. The handoff package tells when it appears.