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
Nothing too fancy, if the user logs in it will be redirected to localhost:3000/mycourses and if i try to access that route directly without login first i will be redirected to localhost:3000/login.
Everything is working in local but when i deploy on vercel and i try to access mydomain.vercel.app/mycourses i am redirected here :
https://mydomain.vercel.app/api/auth/signin?callbackUrl=%2Fmycourses
And Vercel gives me a 404 page.
Same stuff when i go to the login page and i try to login i'm redirected to
/api/auth/error
On the network tab i see that it's trying to access to the providers like so
https://mydomain.vercel.app/api/auth/providers
But it gives a 404.
I've tried both adding the NEXTAUTH_URL variable in vercel or removing it but with no luck.
I've no idea on how to solve this.
How to reproduce ☕️
To reproduce it i just deploy my app on vercel
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered:
For anyone finding this issue without a fix. After spending hours i've found a solution.
I had an "api" folder in the root of the project.It was not breaking in local but it was in Vercel. So after renaming it it worked!
rename make next-auth work, but I need add some go serverless funciton (which are required by vercel to put in /api dir) ,have any ideas to make both work
Question 💬
I have this basic setup with a CustomProvider which is a python backend server with which i authenticate my app :
This is my Next middleware :
And this is my login page :
Nothing too fancy, if the user logs in it will be redirected to
localhost:3000/mycourses
and if i try to access that route directly without login first i will be redirected tolocalhost:3000/login.
Everything is working in local but when i deploy on vercel and i try to access mydomain.vercel.app/mycourses i am redirected here :
https://mydomain.vercel.app/api/auth/signin?callbackUrl=%2Fmycourses
And Vercel gives me a 404 page.
Same stuff when i go to the login page and i try to login i'm redirected to
/api/auth/error
On the network tab i see that it's trying to access to the providers like so
https://mydomain.vercel.app/api/auth/providers
But it gives a 404.
I've tried both adding the
NEXTAUTH_URL
variable in vercel or removing it but with no luck.I've no idea on how to solve this.
How to reproduce ☕️
To reproduce it i just deploy my app on vercel
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
The text was updated successfully, but these errors were encountered: