Menu

Fix Google redirect_uri_mismatch with Supabase Auth
📰

Fix Google redirect_uri_mismatch with Supabase Auth

DEV Community: webdev·AI App Medic·9 days ago
#b7qqrJLS
#devtowebdev#devto#dev#google#supabase
Long article (831 words) — no AI summary yet.
Reading 0:00
15s threshold

The user clicks Sign in with Google, a Google page appears, and it stops with Error 400: redirect_uri_mismatch . They never reach your Lovable, Bolt, or Cursor app. Google is rejecting the callback URL before Supabase issues a session. This is not a broken button, and it is not the same as a login that works and then drops the user on localhost:3000 .

What Google is actually checking

Your app calls supabase.auth.signInWithOAuth({ provider: "google" }) . Supabase sends the browser to Google with your project's Client ID and a redirect_uri . That URI is Supabase's own callback, normally:

https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback

Enter fullscreen mode

Exit fullscreen mode

Google continues only if that exact string is listed under Authorized redirect URIs on the same OAuth client. Scheme, host, path, and trailing slash all have to match.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.