Skip to content
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

Use of headers() in next 15 give a error #13

Open
ncasola opened this issue Oct 24, 2024 · 1 comment
Open

Use of headers() in next 15 give a error #13

ncasola opened this issue Oct 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ncasola
Copy link

ncasola commented Oct 24, 2024

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

image

@ncasola ncasola added the bug Something isn't working label Oct 24, 2024
@frankie567
Copy link
Member

Thank you for the report @ncasola 🙏

This is a breaking change introduced in Next.js 15... It's really hard to keep up with them, this is exhausting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants