workos / authkit-nextjs

The WorkOS library for Next.js provides convenient helpers for authentication and session management using WorkOS & AuthKit with Next.js.
MIT License
58 stars 14 forks source link

Allow the customization of cookieName #58

Closed mattbf closed 1 week ago

mattbf commented 3 months ago

Issue

If you are using workOS to integrate into a full stack app (a separate backend and frontend) then you have to set the cookie in the backend and consume it in the frontend.

The AuthKit package for nextjs will only consume the cookie properly if you set the cookieName in the backend to "wos-session". This is because it's hardcoded here and then consumed elsewhere as cookieName.

PaulAsjes commented 1 week ago

Fixed in v0.11.0.