basePath and redirect_uri issues when deploying to vercel #9775
Replies: 3 comments 1 reply
-
same here, I also found this problem after changing many things to
it doesn't change the last one I try out is the solution for me.
I think a new version of google provider might have something wrong or just doesn't support so, do you find out another solution on a new version? Thanks updates 16 Aug 2024
|
Beta Was this translation helpful? Give feedback.
-
It looks like this issue did not receive any activity for 60 days. It will be closed in 7 days if no further activity occurs. If you think your issue is still relevant, commenting will keep it open. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I'm running into this issue too. Like you, everything works locally but I get the mismatch when I deploy to Vercel. Have you managed to determine a workaround? |
Beta Was this translation helpful? Give feedback.
-
Question 💬
On my local environment when I go to:
http://localhost:3000/api/app/auth/providers
everything works as supposed, I get back:But on vercel when i go to
https://my-app.vercel.app/api/app/auth/providers
I get back:
so when the request is made to:
Request URL: https://accounts.google.com/o/oauth2/v2/auth
it contains:
redirect_uri: https://my-app.vercel.app/api/auth/callback/google
in the payloadI tried playing with
NEXTAUTH_URL
andNEXTAUTH_URL_INTERNAL
but the docs say:Using:
What am i missing to get the correct urls back on vercel?
How to reproduce ☕️
In my SessionProvider l have defined the basePath like:
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions