Errors and refusals
In the SDK
| Error | From | Meaning | What to do |
|---|---|---|---|
LoginRejected | completeLogin, finishLoginResponse, embedLogin().result | the sign-in can't be completed | show "sign-in failed" and let the user start again |
refreshTokens → null | the session is over | sign in again | |
Error from refreshTokens | network, 5xx, 429 | retry later; keep the user signed in | |
TokenRejected('invalid') | verify | not a valid token for your app | 401 |
TokenRejected('revoked') | verify | session closed | 401 |
TokenRejected('unavailable') | verify | revocations not read for 60 s | 503 |
DirectoryEntryInvalid | verifyDirectoryEntry | entry not signed by the account | don't use the keys |
OperationError | crypto.subtle.decrypt | data changed, other label, or other key | see The app key |
HTTP error codes
Body: { "error": "CODE" }.
| Code | Status | Where | Meaning |
|---|---|---|---|
OAUTH_INVALID_REQUEST | 400 | /oauth/token | malformed body |
OAUTH_INVALID_CLIENT | 400 | /oauth/token, sign-in page | unknown or disabled client, or callback URL not registered |
OAUTH_INVALID_GRANT | 400 | /oauth/token | code or refresh token unknown, expired, already used, PKCE mismatch, account changed |
AUTH_FAILED | 401 | /service/*, /oauth/revocations | service token wrong or revoked |
NOT_FOUND | 404 | /service/*, directory | not one of your users, or doesn't exist |
SECOND_FACTOR_REQUIRED | 409 | sign-in page | the user must turn on 2FA first; the page offers it |
ACCOUNT_DELETION_PENDING | 409 | sign-in page | the account is being deleted (30 days) |
SERVICE_DELETION_PENDING | 409 | sign-in page | the user is removing your app |
RATE_LIMITED | 429 | everywhere | too many requests; wait |
INTERNAL | 500 | everywhere | our fault; retry later |
Refusal reasons in the logs
Your sign-in log records the precise reason of every refusal, while the API answers only OAUTH_INVALID_GRANT (so an attacker learns nothing).
| Reason | Most likely cause | Fix |
|---|---|---|
redirect-not-allowed | redirectUri in the code differs from the console (trailing slash, port, http/https) | make them identical |
account-inactive | the account is locked or gone | nothing on your side |
deletion-pending | the user is deleting their Novren ID | nothing; they can cancel |
service-leaving | the user is removing your app | nothing; they can cancel |
second-factor-required | mandatory 2FA overdue | the user turns it on; the page guides them |
code-invalid | code expired (60 s) or unknown | start the sign-in again; check for slow callback pages |
code-reused | the callback page ran twice (reload, strict mode) | complete the sign-in once |
client-mismatch | the code exchange uses another clientId | same client in begin and complete |
redirect-mismatch | the exchange uses another redirectUri | same callback URL in begin and complete |
pkce-failed | wrong verifier: a pending request from another sign-in | don't mix requests between tabs |
account-changed | password changed or account status changed | sign in again |
token-invalid | refresh token expired (30 days) or unknown | sign in again |
token-reused | two refreshes with the same token (two tabs, retries) | one refresh at a time; see Keep users signed in |