Next.js Discord

Discord Forum

Supabase Auth Not working in Vercel Deployment

Answered
Serengeti posted this in #help-forum
Open in Discord
SerengetiOP
I'm using the vercel subscription template

https://github.com/vercel/nextjs-subscription-payments

and I'm facing some issue

I have followed the Readme file and deployed my app
but there is 1 issue,
on my localhost:3000 authentication works perfectly but after deploying it to vercel
it does not work and the web console shows this
https://mzwpeqplxjiupysnwteo.supabase.co/auth/v1/token?grant_type=pkce 401

after making auth request
Failed to load resource: the server responded with a status of 401 ()


I have also raised an issue here https://github.com/vercel/nextjs-subscription-payments/issues/246
Answered by riský
I see that you solved it: 🎉
[There was some issue with my ENV variable ](https://github.com/vercel/nextjs-subscription-payments/issues/246#issuecomment-1723219122)
View full answer

2 Replies