basePath and redirect_uri issues when deploying to vercel #9775
Replies: 4 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.
-
|
How to make it work? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
On my local environment when I go to:
http://localhost:3000/api/app/auth/providerseverything works as supposed, I get back:{"google":{"id":"google","name":"Google","type":"oauth","signinUrl":"http://localhost:3000/api/app/auth/signin/google","callbackUrl":"http://localhost:3000/api/app/auth/callback/google"},"login":{"id":"login","name":"Login","type":"credentials","signinUrl":"http://localhost:3000/api/app/auth/signin/login","callbackUrl":"http://localhost:3000/api/app/auth/callback/login"}}But on vercel when i go to
https://my-app.vercel.app/api/app/auth/providersI get back:
{"google":{"id":"google","name":"Google","type":"oauth","signinUrl":"https://my-app.vercel.app/api/auth/signin/google","callbackUrl":"https://my-app.vercel.app/api/auth/callback/google"},"login":{"id":"login","name":"Login","type":"credentials","signinUrl":"https://my-app.vercel.app/api/auth/signin/login","callbackUrl":"https://my-app.vercel.app/api/auth/callback/login"}}so when the request is made to:
Request URL: https://accounts.google.com/o/oauth2/v2/authit contains:
redirect_uri: https://my-app.vercel.app/api/auth/callback/googlein the payloadI tried playing with
NEXTAUTH_URLandNEXTAUTH_URL_INTERNALbut 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