Add OIDC PKCE support for public SPA clients #46
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The current OIDC flow relies on
client_secretfor the token exchange (confidential client). While the secret stays server-side, adding PKCE (Proof Key for Code Exchange) is a security best practice for authorization code flows, especially when the SPA initiates the redirect.Requirements
code_verifierandcode_challenge(S256) before redirecting to the OIDC providercode_challengeandcode_challenge_method=S256in the authorization requestcode_verifierin the callback POST to the servercode_verifierin the token exchange request to the OIDC providerPriority
Low — the current flow is secure since the client_secret is server-side. PKCE adds defense-in-depth against authorization code interception.
Reference
RFC 7636 — Proof Key for Code Exchange