Everything works fine except logging in. The redirect_uri query parameter which gets sent for authentication to reddit is the localhost:3000 one instead of the domain.
If I set the NEXTAUTH_URL to https://my-domain.com
Then the home page doesn't even load at all and there's log errors about not being able to reach /api/auth/session on that domain, however I tried accessing it myself and it worked fine. Any ideas?
EDIT:
Turned out to be an issue on my end, caused by a firewall misconfiguration. The correct configuration would be to use the domain in NEXTAUTH_URL, just have to make sure the container can actually access it.
I've tried a bunch of env values but they each lead to different issues. With:
(I've excluded the irrelevant ones regarding secrets but they are set)
Everything works fine except logging in. The
redirect_uri
query parameter which gets sent for authentication to reddit is thelocalhost:3000
one instead of the domain.If I set the
NEXTAUTH_URL
tohttps://my-domain.com
Then the home page doesn't even load at all and there's log errors about not being able to reach
/api/auth/session
on that domain, however I tried accessing it myself and it worked fine. Any ideas?EDIT:
Turned out to be an issue on my end, caused by a firewall misconfiguration. The correct configuration would be to use the domain in
NEXTAUTH_URL
, just have to make sure the container can actually access it.