What is the difference between OAuth and OpenID Connect?
Ask by ICSM Computer
Updated 08 Jun 2025
The difference between OAuth 2.0 and OpenID Connect (OIDC) lies in purpose:
OAuth 2.0: Authorization Framework
Example:
A fitness app wants access to your Fitbit data (but doesn't need your email or who you are).
OpenID Connect (OIDC): Identity Layer on Top of OAuth 2.0
Example:
Your app lets users log in with their Google account → you get who the user is (email, name, etc.).
Technical Differences
userinfoendpointread,writeopenid,profile,emailExample: Login with Google
If you just use OAuth 2.0, you'll get an access token for calling APIs (e.g., Google Calendar API), but you won't know who the user is.
If you use OpenID Connect, you'll also get:
id_token: contains user identity info (email, sub, name, etc.)Summary