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
Use of headers() in next 15 give a error: [ Server ] Error: Route "/private" used headers().get('X-FiefAuth-Access-Token-Info'). headers() should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
This is a breaking change introduced in Next.js 15... It's really hard to keep up with them, this is exhausting.
Hello, I would like to contribute to this issue. Could you guide me on how to proceed?
After reviewing the code, I believe the issue can be resolved by following these steps:
• The function should be converted to an async function, and the const headersList = headers(); line should be awaited.
• The places where the function is used should also be updated to use async/await.
Describe the bug
Use of headers() in next 15 give a error:
[ Server ] Error: Route "/private" used
headers().get('X-FiefAuth-Access-Token-Info').
headers()should be awaited before using its value. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
To Reproduce
Follow the integrate guide in https://docs.fief.dev/integrate/javascript/ssr/nextjs-app/
Configuration
JavaScript environment: NextJs 15, pnpm, TS
Fief client version: npm @/fief latest
Fief Cloud or self-hosted: self-hosted
If self-hosted, Fief version: ghcr.io/fief-dev/fief:latest
Additional context
The text was updated successfully, but these errors were encountered: