feat(oidc): add enterprise SSO login with Authorization Code + PKCE - #59
feat(oidc): add enterprise SSO login with Authorization Code + PKCE#59bonashen wants to merge 1 commit into
Conversation
- /api/auth/oidc/{config,authorize,callback} endpoints with state + PKCE S256 + nonce; state rows deleted before validation to prevent replay
- JWT verification via JWKS with issuer/audience/exp checks, clock skew tolerance, optional nonce check
- user mapping by (tenant_id, oidc_sub), auto-provision on first login; configurable display name (OIDC_NAME)
- login page SSO button, callback token consumption from URL fragment, session bootstrap with oidc-pending placeholder
- keep original Host header in the vite /api proxy so redirect_uri derivation stays correct
- 9 backend tests + 5 frontend tests; E2E validated against Keycloak in WSL docker compose
|
I tested this PR locally against the latest Merge result:
The core OIDC flow looks solid overall: Authorization Code + PKCE, state/nonce handling, JWKS-based ID token validation, issuer/audience/expiration checks, one-time state consumption, and stable user mapping by OIDC That said, I think there are a few points worth addressing before treating this as production-ready enterprise SSO:
|
/api/auth/oidc/{config,authorize,callback} endpoints with state + PKCE S256 + nonce; state rows deleted before validation to prevent replay
JWT verification via JWKS with issuer/audience/exp checks, clock skew tolerance, optional nonce check
user mapping by (tenant_id, oidc_sub), auto-provision on first login; configurable display name (OIDC_NAME)
login page SSO button, callback token consumption from URL fragment, session bootstrap with oidc-pending placeholder
keep original Host header in the vite /api proxy so redirect_uri derivation stays correct
9 backend tests + 5 frontend tests; E2E validated against Keycloak in WSL docker compose