Lesson 02Identity
OAuth 2.0: Permission Without Sharing Passwords
"Sign in with Google" does not mean Google leaks your password. OAuth is a permission protocol: the app receives a limited token, not the key to your account.
- Layer
- Layer 7 · Application
- Reference
- RFC 6749 (OAuth 2.0)
- Steps
- 7
NETLEARN · your study buddy
Net · guide
Hi! I’m Net, your guide today. We’ll look at OAuth 2.0: Permission Without Sharing Passwords in the Sessions & Identity module.
how it works
tap Net · advance one step⟲ button · start overEnter · open the full explanation
legendrequestresponsesecure / encryptedmessage in flight
Common misunderstandings
- Don't mix them up: giving an app an access token does not mean you hand over your account. But a leaked token is still dangerous until it expires. That is why its life is short.
Key notes
- OAuth ≠ login
- OAuth grants permission. For identity, the OpenID Connect (OIDC) layer on top adds an ID token.
- Authorization code
- The safest flow: the token never touches the browser, only a one-time code.
- Scope
- Determines how broad the access is. "Read profile" is not the same as "send email on your behalf".
- PKCE
- For mobile/SPA apps without a client secret, PKCE prevents the code from being stolen and exchanged by someone else.
