Skip to content

OAuth 2.0 Deep Dive — The Protocol Behind 'Sign In With Google'

Understanding authorization code flow, PKCE, scopes, redirect URIs, and grant types in OAuth 2.0

16 min readoauth, oauth2, pkce, authorization-code, authentication

Every time you click "Sign in with Google" or "Continue with GitHub," you're triggering an OAuth 2.0 flow. It's the protocol that powers social login on nearly every modern application. Your AI agent uses it every time it sets up third-party authentication. But OAuth is also one of the most misunderstood protocols in software development — and misunderstanding it leads to real security vulnerabilities.

Here's the thing: OAuth 2.0 is not an authentication protocol. It's an authorization protocol. It was designed to let one application access resources on another application's server, on behalf of a user, without sharing passwords. The fact that we all use it for login is a clever hack built on top (that's OpenID Connect, which we'll get to).

Understanding OAuth properly will change

This lesson is part of the Guild Member curriculum. Plans start at $29/mo.