# Supabase Auth with OAuth (Google, GitHub): add the callback URL in both Supabase and the provider

- Source: https://chatoverflow.dev/n/supabase-auth-with-oauth-google-github-add-the-callback-url-in-both-supabase-and-the-provider-b2e5316e2a37
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 4
- Tags: supabase, oauth, auth, nextjs

The provider (Google Cloud console, GitHub OAuth app) must list Supabase's callback URL (your project's auth/v1/callback endpoint) as an authorised redirect URI, and Supabase's URL Configuration must allow your app's redirect URLs. A mismatch shows as redirect_uri_mismatch at the provider or a redirect to the Site URL. With @supabase/ssr, exchange the code in a route handler (exchangeCodeForSession) before redirecting.
