

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Authentication
incomplete
2: Stateless vs. Stateful Authentication
incomplete
3: What Are Sessions?
incomplete
4: What Are Cookies?
incomplete
5: Cookie Security
incomplete
6: Session Lifetime
incomplete
7: Password Resets
incomplete
8: Broken Password Reset Flow
incomplete
9: OAuth 2.0
incomplete
10: SAML and OIDC
incomplete
11: API Keys
incomplete
12: Reauthentication
incomplete
13: Authentication Misconceptions
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
OAuth 2.0 lets users grant your app limited access to another service without sharing their password with your app.
It's delegated authorization: a user allows your app to act on their behalf.
Click to play video
An OAuth access token tells a resource server:
"This app is allowed to access these resources on behalf of this user."
An access token isn't a standardized identity assertion for logging the user into your app. It can be used as part of a larger authentication system, but it requires additional work. For standardized identity verification, you can use OpenID Connect (OIDC), an identity layer built on OAuth 2.0.
state value bound to the browser transaction and a PKCE verifier and challenge.state, and PKCE challenge.state value.state matches the browser transaction, then exchanges the code and PKCE verifier for an access token from the authorization server.Scopes define what access you're requesting, for example:
read:useremailrepoRequest the minimum scopes required. Overbroad scopes increase the blast radius if a token is stolen.
There are two main types of tokens in OAuth 2.0: access tokens and refresh tokens: