Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with hosting behind an nginx proxy #152

Closed
svilenmarkov opened this issue Feb 10, 2023 · 0 comments
Closed

Issues with hosting behind an nginx proxy #152

svilenmarkov opened this issue Feb 10, 2023 · 0 comments

Comments

@svilenmarkov
Copy link

svilenmarkov commented Feb 10, 2023

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)

REDDIT_REDIRECT=http://my-domain.com/api/auth/callback/reddit
NEXTAUTH_URL=http://localhost:3000

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant