-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Error on Next.js 15 about synchronous usage of headers()
#12136
Comments
For me this was resolved when updating to: [email protected].25 |
see #12136 (comment) please upgrade |
Thanks, it worked |
Thanks man. |
same error i'm getting |
go to package,json change "next-auth": "5.0.0-beta.23" to "next-auth": "5.0.0-beta.25" then > npm i |
@balazsorban44 I have this same issue, but I am also utilizing |
Environment
Reproduction URL
https://github.com/spaceness/stardust
Describe the issue
Next.js 15 introduced breaking changes to some dynamic APIs, such as headers(). That API must now be accessed asynchronously. Auth.js still accesses them synchronously, which throws multiple warnings when you go to run your app. For example, when you try to access the log in page in the aforementioned application, this is logged:
How to reproduce
Setup Auth.js in a Next.js 15 application and use a function such as
auth()
Expected behavior
These headers should be accessed with
await
to reflect the changes, and no errors should be logged in the console.The text was updated successfully, but these errors were encountered: