isReturnToCurrentPage in Next.js middleware
"@kinde-oss/kinde-auth-nextjs": "^2.3.3",and
"next": "^14.2.3",My middleware setting:
My expectations:
- Go directly to domain.com/books/scifi and get redirected to login - as expected.
- After logging in, get redirected back to domain.com/books/scifi - fails.
I can see the GET request go through with this URL:
/api/auth/login?post_login_redirect_url=/books/scifiBut Next.js gives this error:
⨯ Error: URL is malformed "/books/scifi". Please use only absolute URLs