Skip to content
Web Security

What is OAuth 2.0 Authorization Code Flow?

The standard delegation flow where users approve access on the provider and the app exchanges a short-lived code for tokens server-side. BYOB-managed Google sign-in hides this handshake from project developers entirely.

Example

BYOB-managed Google sign-in runs this flow behind the scenes: the user approves on the provider, tokens land server-side, and project code receives a session without ever touching client secrets or code values.

What people get wrong

Running the legacy implicit flow that returns tokens in the URL fragment. Fragments leak through history and referrers; the code flow keeps tokens out of the browser address bar entirely.

Frequently asked questions

Why prefer the code flow over implicit?

Tokens travel through a back-channel exchange instead of the URL, so they avoid fragment leakage and gain PKCE and client authentication protections.

Sources

Browse all Web Security terms →