You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same issue arises when using any of the other functions that use headers() or cookies(), such as getAccessToken and similar.
This is due to the breaking changes that were implemented in NextJS 15.
I am guessing that this is a very important issue: it breaks the possibility to correctly authenticate server-side code.
TLDR; NextJS 15 IS NOT SUPPORTED until v4 is released.
V4 is effectively a rewrite and has many breaking changes, but is in beta. So id recommend using the beta if you want to use Next 15, or waiting for the official release whenever that happens
Thanks for reporting this issue. These errors are related to Next.js 15's new requirement for async handling of cookies and headers, which is a breaking change. As noted in our announcement, Next.js 15 compatibility is only available in our v4 beta release.
Closing this issue as it's being tracked as part of the broader Next.js 15 compatibility work. For v4 beta specific issues, please open new issues and tag them accordingly.
Checklist
Description
When using the getSession function imported from auth0/nextjs-auth0, I get a few errors in the console when the app compiles.
Specifically these 3:
cookies().getAll()
.cookies()
should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apiscookies().set('appSession', ...)
.cookies()
should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apisparams.auth0
.params
should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apisAll three errors appear to be coming from here:
at get (file:///Users/brianstern/code/ai-companion-next/node_modules/next/src/server/base-server.ts:3121:48)
Reproduction
Additional context
No response
nextjs-auth0 version
3.5.0
Next.js version
15.0.2
Node.js version
22.8.0
The text was updated successfully, but these errors were encountered: