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.
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.