Gallery · Auth / SSO

OAuth2 Authorization Code + PKCE

How a web app with a backend-for-frontend signs users in through an OpenID Connect identity provider: the redirect dance, the back-channel token exchange, silent refresh, real logout and first-login provisioning. Tokens never reach JavaScript — the browser only holds an opaque HttpOnly session cookie.

Browser App backend (BFF) Datastore Identity provider

Click a node to jump to its step · Shortcuts: Space play/pause · ←/→ step · 1–4 flow · O mode · T theme · F fullscreen · R reset layout · Drag a node (or focus it and press Shift+←↑↓→) to repositionTap a node to jump to its step. ·

Pipeline · —
— / —
Browser
SPA · React
localhost:3000
·
Keycloak (local)
Keycloak 23 · Docker
:8081 · realm demo
·
App Backend (BFF)
Node.js · Express
:3000 · http
·
Session Store
Redis 7 · Docker
:6379 · no auth
·
User DB
Postgres 15 · Docker
:5432
·