Auth and security

Lesson 07 · 12 min

Sign in with Google: OAuth 2.0 and OIDC

Google keeps the password, and your server gets confirmation of who it is.

12 minLesson 7 of 9Practice includedAsk AI on any point

OAuth 2.0 is a protocol by which a user grants an app access to their data in another service. OpenID Connect (OIDC) adds sign-in on top: besides an access token, the provider issues an id_token — a signed JWT with sub (the user's id at the provider), email, and name. Sites with a server use the authorization code flow: the browser goes to the provider, comes back with a one-time code, and the server exchanges it for tokens.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.