New
ForumO Jobs is newly launched · Browse openings across India · Sign in only when you open a role · Built for candidates and hiring teams · ForumO Jobs is newly launched · Browse openings across India · Sign in only when you open a role · Built for candidates and hiring teams ·
← Community
DoubtProjects

Login works on localhost, dies the moment I deploy to Vercel

Aarav

8 days ago

small next.js + supabase thing. on my laptop i sign in and it stays signed in. after vercel deploy, every protected page just dumps me back on /login. cookies are there in the browser, middleware is calling getUser(). i've been on this since yesterday. if someone has hit this, what did you actually change? i keep seeing 'check your env' which i already did like 4 times.

Share this post

WhatsAppLinkedInX

2 replies

Dev

8 days ago

same thing last month. my NEXT_PUBLIC_APP_URL was still http://localhost on vercel. also add the production url in supabase redirect urls. once both matched, it stuck.

Isha

8 days ago

and put the supabase middleware on /dashboard also, not only the login route. i had getUser only in the page so the cookie never refreshed.

Reply