You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's probably an easy fix, but I don't understand what I have to do.
I saw some people having this issue too, but I didn't understand the fix. #600 #2818 334
If you need any more information, I'd like to provide those. 😄
thank you very much in advance, and sorry for my bad English :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Upfront - I'm not an expert and just started out using Vercel and Supabase for the first time. 👋
I started developing a small tool locally (localhost:3000), started using Supabase for the Database and OAuth with Google.
Created the Key & Credentials and the Login with Google worked great locally.
After deploying with Vercel I changed the Site URL and added Authorized Redirect URL, so I could sign up on the deployed domain.
But now I'm always being redirected to the deployed domain, after trying to sign in locally with localhost:3000.
I'd like to be able to login in locally with Google (my only Auth) to further develop the project. And not only on my deployed Domain.
Some context:
Google OAuth conf:
Authorized JavaScript:
https://[myVerceldomain].vercel.app
Authorized Redirect URL:
https://[myVerceldomain].vercel.app/auth/callback
https://[SUPABASE_ID].supabase.co/auth/v1/callback
http://localhost:3000/auth/v1/callback
Supabase configuration
Site URL: https://[myVerceldomain].vercel.app
Redirect URLs:
https://[myVerceldomain].vercel.app/
https://[myVerceldomain].vercel.app/**
http://localhost:3000
supabase.ts
const getRedirectUrl = () => { const baseUrl = process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : process.env.NEXT_PUBLIC_SITE_URL; return baseUrl; };
.env.local
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_REDIRECT_URL=http://localhost:3000/auth/callback
It's probably an easy fix, but I don't understand what I have to do.
I saw some people having this issue too, but I didn't understand the fix.
#600
#2818
334
If you need any more information, I'd like to provide those. 😄
thank you very much in advance, and sorry for my bad English :)
Beta Was this translation helpful? Give feedback.
All reactions