Skip to the guide

OAuth 2.0 and OpenID Connect

IntermediateConcept3 pages

OAuth 2.0 lets a user give an app limited access to their data on another service without handing over their password, such as a printing app reading your Google Photos. OpenID Connect (OIDC) is a thin layer on top that adds login: "Sign in with Google" is OIDC. Interviewers ask which flow you'd use, why it takes a detour through a code, and what the ID token is for.

Collecting a parcel for a friend

Your neighbour Sam will collect a parcel for you at the post office. You don't lend Sam your passport. You go to the counter yourself, prove who you are, and say "Sam may collect my parcels this week." The counter gives Sam a numbered ticket. Sam brings the ticket and his own ID back to the counter and swaps them for a collection pass: parcels only, yours only, until Sunday. If the counter also gave Sam a signed note saying "this really is Maria, checked at 10:02", that would be OpenID Connect.