0
0
Supabasecloud~3 mins

Why OAuth providers (Google, GitHub) in Supabase? - Purpose & Use Cases

Choose your learning style9 modes available
The Big Idea

What if you could let users log in without ever touching their passwords?

The Scenario

Imagine you want to let your friends log into your app using their Google or GitHub accounts. Without OAuth, you'd have to create and manage usernames and passwords for everyone yourself.

This means asking them to remember new passwords and you storing sensitive data, which is risky and complicated.

The Problem

Manually handling user passwords is slow and risky. You must securely store passwords, handle resets, and protect against hacks.

It's easy to make mistakes that expose user data or lock people out.

The Solution

OAuth providers like Google and GitHub let users log in safely without sharing passwords with your app.

Your app simply asks these providers to confirm who the user is, making login easy and secure.

Before vs After
Before
store user passwords securely
handle password resets
validate login credentials
After
redirect user to Google/GitHub login
receive confirmation token
allow access based on token
What It Enables

OAuth lets your app offer quick, secure login using trusted accounts, freeing you from managing passwords.

Real Life Example

When you visit a new website and click 'Sign in with Google', you skip creating a new password and log in instantly using your Google account.

Key Takeaways

Managing passwords yourself is hard and risky.

OAuth providers handle user identity securely for you.

This makes login easier and safer for everyone.