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
fix(core): respect NEXTAUTH_SECRET
in unstable_getServerSession
#4774
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
🎉 Experimental release published on npm! npm i next-auth@0.0.0-pr.4774.a31ef368 yarn add next-auth@0.0.0-pr.4774.a31ef368 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
hey! is there a related issue here I can follow up on? I'm getting:
on providing a secret via:
and simple usage via:
|
Okay, maybe a dumb question, but just to cover our bases - you're running that |
hey yup! it was in a serverless function. |
Maybe the import is incorrect? Cause its trying to read I think there might need to be a Or maybe your exporting the authOptions as a default export from your [...nextauth] file? |
okay so thats a good lead. i also tried to recreate this in a codesandbox which gives me an error:
which i dont get locally when trying to import it https://codesandbox.io/s/bold-dust-5jjbwf?file=/pages/api/test.js:152-385 if i try logging out the default export from is there a proper example for accessing this? i just copy and pasted the example from the docs https://next-auth.js.org/getting-started/example#backend---api-route also im thinking this might be out of scope so happy to move this conversation elsewhere, whatever you prefer :) |
Thanks for @gt-codes pointing this out.
☕️ Reasoning
What changes are being made? What feature/bug is being fixed here?
🧢 Checklist
🎫 Affected issues
Please scout and link issues that might be solved by this PR.
Fixes: INSERT_ISSUE_LINK_HERE
📌 Resources