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
68 stars 19 forks source link

Fix issue with redirectURI in middleware auth mode #102

Closed PaulAsjes closed 1 month ago

PaulAsjes commented 1 month ago

We set the redirectURI as a header, which isn't immediately available in middleware auth mode as it's the same request. Fix is to provide the redirect URI directly.