NEXTAUTH_URL is redirecting to a different uri than my github app callback URL #4853
Unanswered
nicolasguasca1
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello guys, Thank you for opening this space for discussions. I have the following situation. Steps to reproduce:
Set a .env.local file with the following value: NEXTAUTH_URL="http://subdomain.localhost:3000/".
Set a callback url on a Github app with this value: "http://subdomain.localhost:3000/".
Create a middleware function to deal with the rewriting of the subdomain like this:
Also, here is my [...nextauth].ts
Expected behaviour:
The next app uses the session token to redirect back to / or ask for the credentials and then go to /.
Actual behaviour: nextauth warns that the redirect uri doesn't match the one specified in the callback url of the github app (which are actually the same).
Any help would be realy appreciated folks!
Beta Was this translation helpful? Give feedback.
All reactions