-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Required AUTH_SECRET in latest version #10432
Comments
It's due to this wrong fix : #10305 |
Also it's not |
Hi @LoisDuplain , I opened a new issue (#10478), because I think this might have been closed incorrectly. I hope you don't mind I copied over your details described in this issue. |
Any fix is available for this ? , I have AUTH_SECRET in my env, still facing issue |
I was facing the same issue, and the problem was that these specific environment variables can't be read in the 'use client' directive, so you must locate that logic in a server side file. |
Yeah the issue is that your Also keep in mind when building for prod, next.js is prerendering these apps so its gotta be there during build too |
Also without this warning, yuo wuold have shipped to prod with an empty |
Environment
System:
Binaries:
Browsers:
npmPackages:
Reproduction URL
https://github.com/LoisDuplain/next-auth-example
Describe the issue
In the latest version of next with next auth, the AUTH_SECRET environment variable is mandatory, whereas it wasn't before.
It's not logical that it should be, because I need to deploy the same software several times for different customers, for example. So I'm not going to have fun recompiling my software 20 times for each customer just to have a different AUTH_SECRET.
How to reproduce
There are two branches on the reproduction repository:
To reproduce it juste git clone and execute
npm run build
Then switch to "previous-version" branch and execute
npm run build
Expected behavior
In the latest version of next with next auth, the AUTH_SECRET environment variable is mandatory, whereas it wasn't before.
It's not logical that it should be, because I need to deploy the same software several times for different customers, for example. So I'm not going to have fun recompiling my software 20 times for each customer just to have a different AUTH_SECRET.
The text was updated successfully, but these errors were encountered: