Reference
Errors
Every SDK error has a machine-readable code. Show the person a short sentence, then the next step. These codes help you debug; they are not a complete catalogue of every failure a network can produce.
The button
The button shows the message to the person and sends the code in the rhea-error event.
| Code | The person sees | Fix |
|---|---|---|
SIGNIN_FAILED right after the click | Sign-in failed | The site is not registered, or its domain proof is missing. Register the exact address on rheakey.com/apps. |
CHALLENGE_UNAVAILABLE | This site could not start sign-in | POST /rhea-challenge is missing or did not return nonce, issuedAt and expirationTime. |
CHALLENGE_REQUIRED | This site could not start sign-in | challenge="client" is used outside localhost. Remove it and add /rhea-challenge. |
VERIFY_FAILED | This site could not confirm sign-in | POST /rhea-verify answered non-2xx or took longer than 15 seconds. |
RELAY_UNAVAILABLE | Could not reach Rhea Key, try again | A network problem. Retry. |
POPUP_BLOCKED | Allow pop-ups to sign in | Start sign-in from a click, not on page load. |
WINDOW_CLOSED, TIMEOUT, DENIED, EXPIRED | Sign-in window closed, timed out, cancelled or expired | Nothing to fix. The person can try again. |
IN_PROGRESS | Sign-in is already open | Wait for the first attempt to finish. |
OpenID Connect and @rheakey/sdk
| Code | What it means | Next |
|---|---|---|
MISSING_CLIENT_ID | The app has not been given its client id. | Register the app and set the id. |
DISCOVERY_FAILED | The issuer metadata could not be loaded. | Check discovery and try again. |
POPUP_BLOCKED | The approval window could not open. | Allow pop-ups, or use the redirect flow, or QR. |
WINDOW_CLOSED | The approval window was closed. | Start sign-in again. |
TIMEOUT / SIGN_IN_EXPIRED | The attempt ran out of time. | Start sign-in again. |
ACCESS_DENIED / USER_CANCELLED | The person declined or cancelled. | Offer a clear retry. |
SIGN_IN_IN_PROGRESS | Another attempt is already open on this client. | Wait or cancel the first attempt. |
SIGN_IN_RESTART_REQUIRED | The one-use code can no longer be reused. | Start a fresh sign-in. Do not replay the callback. |
CALLBACK_MISMATCH / STATE_MISMATCH / NONCE_MISMATCH | The return did not match the attempt this page started. | Start again from this page, with the same redirect address. |
TOKEN_EXCHANGE_FAILED | The authorization code could not be exchanged. | Check the client secret or PKCE verifier, then retry with a new sign-in. |
BAD_SIGNATURE / UNKNOWN_SIGNING_KEY / UNSUPPORTED_ALGORITHM | The token could not be verified against the published keys. | Refuse the session. Check you are using issuer https://rheakey.com. |
TOKEN_EXPIRED / INVALID_TIMESTAMP | The token is outside its valid time window. | Refuse and start sign-in again. |
ASSURANCE_NOT_MET | A requested hardware profile is not available. | Do not require hardware assurance today. |
ORIGIN_NOT_REGISTERED | This https origin has not completed domain proof. | Publish the proof and register the exact redirect address. |
invalid_redirect_uri | The redirect address is not an exact, allowed match. | Register the exact string the app will use. |
