Replies: 7 comments
-
Have you defined With a setup like the above you should be able to do it at runtime in |
Beta Was this translation helpful? Give feedback.
-
Yes that environment variable is set. Just to sanity check, I disabled it and not only did I get a console warning about the missing variable but the signin callback broke (since I have a FQDN instead of |
Beta Was this translation helpful? Give feedback.
-
Any ideas? Doesn't proper authentication in a production environment necessitate HTTPS? How is this done when not hosting with Vercel? I sure hope it's not to run a server in front of the server or some other redundant solution like a reverse proxy. |
Beta Was this translation helpful? Give feedback.
-
@skrenes Did you figure out a solution? |
Beta Was this translation helpful? Give feedback.
-
@nstolmaker Unfortunately I had no success solving this problem. So I ripped out the custom server ( |
Beta Was this translation helpful? Give feedback.
-
@nstolmaker Can you provide me your nginx config ? I'm having issues with next auth behind a reverse proxy |
Beta Was this translation helpful? Give feedback.
-
I'm disappointed this has moved to a discussion, instead of being taken seriously. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I'm running Next.js on my own infrastructure with HTTPS, which as far as I known requires setting up the NodeJS server manually. When I do this, however, I get an
undefined
error with next-auth when attempting email authentication.Steps to reproduce
server.js
file to enable HTTPS although the problem can be reproduced using HTTP as well if you do not have certificates available. Refer to Additional context for example code for both.node server.js
Expected behavior
I should be authenticated. Instead I get a black page with the heading "Error" and my domain as a subheading. With the next-auth debug option turned on, the console reports (email in console is changed to [email protected]):
Screenshots or error logs
N/A
Additional context
Feedback
Documentation refers to searching through online documentation, code comments and issue history. The example project refers to next-auth-example.
Beta Was this translation helpful? Give feedback.
All reactions