Skip to main content

OAuth 2.0, OpenID Connect and Social Login

Learn OAuth 2.0, OpenID Connect and Social Login (Spring Security, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

The Problem OAuth 2.0 Solves You want a photo-printing app to read your photos from Google. The wrong way is to give the app your Google password: it could then do anything as you, forever. OAuth 2.0 lets you give the app a limited, revocable access token instead - "read photos only, until I cancel it" - without the app ever seeing your password. OAuth 2.0 is about authorization (what an app may do). OpenID Connect (OIDC) is a thin layer on top that adds authentication (who the user is), which is what "Sign in with Google" uses.

More lessons in Spring Security