Authenticationintermediate

OAuth Callback

A URL in your app that receives the authentication response after a user completes OAuth sign-in with an external provider.

Detailed Explanation

An OAuth Callback (also called a redirect URI) is the URL where your app receives the authentication response after a user signs in through an external provider like Google.

Here's how it fits into the OAuth flow:

  1. User clicks "Login with Google" on your app
  2. Browser Redirects to Google's consent screen
  3. User approves access
  4. Google redirects back to your OAuth callback URL (e.g., /auth/callback)
  5. Your app receives a secure Token from the provider
  6. Supabase creates a Session and the user is logged in

The callback URL must be registered in both the OAuth provider (Google Cloud Console) and your Supabase dashboard. If the URLs don't match exactly, Authentication will fail with a "redirect URL mismatch" error.

In a React app using React Router, the callback is typically a Route that checks the session and redirects the user to the main page.

Free forever

Start building software you actually own.

Learn the concepts, fix things with confidence, and ship real products with AI beside you. No coding background required, and we're with you from the first idea to launch.

Free to start. No card. Leave whenever you want.