What is PKCE?
PKCE (Proof Key for Code Exchange, RFC 7636) protects the OAuth authorization code flow: the client proves, when it exchanges the code for tokens, that it is the same client that started the login.
How it works
Before redirecting the user, the client generates a random secret, the code verifier, and sends a hash of it, the code challenge, with the authorization request. With the S256 method, the challenge is the SHA-256 hash of the verifier, Base64URL-encoded.
When the client exchanges the authorization code, it sends the original verifier. The server hashes it and compares. An attacker who intercepted the code cannot use it without the verifier.
PKCE was designed for mobile and single-page apps that cannot keep a secret, and is now recommended for every client using the authorization code flow.
PKCE in SyAuth
SyAuth interactive sign-in uses the authorization code flow with S256 PKCE, and the SyAuth starter generates the verifier and challenge for you.
Related terms
Free for up to 30,000 registered users
Start on the free plan and upgrade when your project grows.
Last updated