fief-dev / fief-js

Fief client for JavaScript
https://docs.fief.dev/integrate/javascript/
MIT License
9 stars 3 forks source link

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

Open ncasola opened 3 hours ago

ncasola commented 3 hours ago

Describe the bug

Use of headers() in next 15 give a error: [ Server ] Error: Route "/private" usedheaders().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

Additional context

image

frankie567 commented 3 hours ago

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.