api/auth/* not found on production #2469
-
Description 🐜Hello, it is 2 days now which i struggling with totally not working as expected issue. I tried everything - configure my project correctly by documentation, start x new projects to test it but i am not successful at all. Sometimes it doesn't work when i develop and sometimes it works - if it not works in develop, then i got error - client failed to fetch - err_too_many_redirects But everytime when i export my build using "npm build && npm export" and try to make it work on server it ALWAYS end up on https://next-auth.js.org/errors#client_fetch_error session SyntaxError: Unexpected token < in JSON at position 0 which seems like bug in library or i really don't know what i am doing wrong Yes i have NEXTAUTH_URL in my .env + i using custom credentials but when i want to use signin in build it seems like the /api/auth/* is just not working and **** with 404 also thin happens on https or http - still the same any advice ? Many thanks Is this a bug in your own project?Yes How to reproduce ☕️<button onClick={() => signIn()}>Sign in Screenshots / Logs 📽Environment 🖥production Contributing 🙌🏽Yes, I am willing to help solve this bug in a PR |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Certainly a configuration issue. Do you have reproduction? Make sure the .env file is present in production. |
Beta Was this translation helpful? Give feedback.
Certainly a configuration issue. Do you have reproduction?
Make sure the .env file is present in production.