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
43 stars 9 forks source link

Revert "Use relative redirect location (#35)" #38

Closed mthadley closed 2 months ago

mthadley commented 2 months ago

Reverts the changes in #35, where are not compatible with more recent NextJS versions (> 12.1), which require an absolute URL:

Prior to Next.js 12.1, we allowed passing relative URLs. However, constructing a request with new Request(url) or running fetch(url) when url is a relative URL does not work. For this reason and to bring consistency to Next.js Middleware, this behavior has been deprecated and now removed.