DEV Community

Bharathvaj
Bharathvaj

Posted on • Originally published at bharathvaj.com

1 1 1 2 2

SSO vs OAuth – Understand the Key Difference

If you're building modern web or mobile apps, chances are you've come across terms like SSO, OAuth, and OpenID Connect (OIDC). While they often appear together, they serve different purposes. Here’s a quick breakdown:

TL;DR

OAuth was not created to be a single-sign-on protocol, it has been extended to be used as one through things like OpenID Connect.

Concept Purpose Deals With Example
SSO One login for multiple apps Authentication Gmail + YouTube login
OAuth Accessing APIs Authorization Access Google Drive
OpenID Connect Verify user identity Authentication "Login with Google" button

✅ SSO (Single Sign-On)

What it does:

Lets users log in once and access multiple apps without re-entering their credentials.

Use case:

Login to Google once → access Gmail, Drive, YouTube.

Powered by:

Protocols like SAML, OIDC, or Kerberos.

Purpose:

Simplifies authentication.


🔄 OAuth

What it does:

Allows apps to access a user’s data without needing their password.

Use case:

A Photo editor app using your Google Drive.

Powered by:

OAuth 2.0 protocol.

Purpose:

Secure authorization (not authentication).


🔍 OpenID Connect (OIDC)

What it does:

Adds authentication on top of OAuth 2.0 — it confirms the user's identity and provides their profile information.

Use case:

Logging in to a third-party app with your Google account. Fetching user identity information like email, profile photo etc.

Powered by:

OAuth 2.0 + ID token (a JWT containing user info).

Purpose:

Handles who the user is, not just what data they can access.


🧪 Real-World Example

  1. Login with Google in your photo editing app:

    ➤ This is Social Login using OAuth + OpenID Connect.

  2. Saving files to the user’s Google Drive from your app:

    ➤ This is OAuth-based Authorization to access Google Drive APIs.

Please do share, comment. Happy coding!

AWS Security LIVE! Stream

Stream AWS Security LIVE!

See how AWS is redefining security by design with simple, seamless solutions on Security LIVE!

Learn More

Top comments (0)

Postmark Image

The email service that speaks your language

Whether you code in Ruby, PHP, Python, C#, or Rails, Postmark's robust API libraries make integration a breeze. Plus, bootstrapping your startup? Get 20% off your first three months!

Start free