/9. IdP error mapping, RP-initiated logout & RFC cross-check

9. IdP error mapping, RP-initiated logout & RFC cross-check

12 cards

Review this deck
All cards in this deck

/authorize error response

The IdP redirects back to the callback with `error` and `error_description` instead of `code`; the callback checks `state` first (stops fake links forcing the maintenance/locked screen), then `error`, then `code`.

`user is blocked`

Show "Your account is restricted from logging in", delete SessionID1.

`connection is not enabled` or `maintenance::`

Show "Login is under maintenance", delete SessionID1.

`access_denied`

The IdP rejects by client × account type via a post-login Action (`event.client.client_id` + `api.access.deny()`) → "Login failed", delete SessionID1.

Enumeration trade-off of a separate "restricted" screen

Revealing the blocked state helps UX but leaks information; the decision must be recorded explicitly as intentional in the spec.

Redirect URI allow-list

The IdP only redirects to URLs registered for the client; each client lists both its login callback and logout callback.

One client, multiple callbacks

The step-up password client registers both `/auth/stepup/callback` and `/auth/stepup/mfa-callback` because the two flows (re-authentication proof vs MFA token) end at different endpoints; do not use a single callback that branches on context.

Keycloak end_session

Endpoint `/protocol/openid-connect/logout` with `id_token_hint` or `client_id` + `post_logout_redirect_uri`.

Sequence diagram matches 1-to-1

Each step in the spec's "Processing details" is one message in the sequence; no step appears on only one side.

RFC 6749 section 4.1

Authorization Code grant, defines the /authorize and /token request/response.

OIDC Core 3.1.3.7

ID Token Validation — the list of checks for iss, aud, exp, nonce, auth_time.

OAuth 2.0 for Browser-Based Apps

Recommends the BFF pattern for SPAs instead of keeping tokens in the browser.

9. IdP error mapping, RP-initiated logout & RFC cross-check – Flashcards – Login Flow | Học Dev