Replies: 2 comments
-
There is an ongoing PR to fix this 👀 #5109 It has a different approach than yours. I suggest we continue in #5109 and work together to find the best solution there! 🙌 Let's keep this issue open in the meantime. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@ThangHuuVu thanks. I have looked in details your PR. I this you follow very similar approach. Only one major difference -
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
next-auth: 4.12.2
next: 12.3.1
Reproduction URL
https://github.com/lavcraft/next-auth-basepath-bug
Describe the issue
This bug trigger when you use basePath option in next.js and configure it via next-auth SessionProvider (basePath property)
After call handleMiddleware function in next-auth package, return value with target callbackUrl doesn't polite with basePath
In this line:
I this, this will be fixed with simple hotfix
How to reproduce
npm ci
npm run dev
Expected behavior
Stored callbackUrl include basePath for handle it correctly after authentication process or in other cases
PS: May be default value for pages: { .. } in next-auth middleware withAuth args also support basePath?
Beta Was this translation helpful? Give feedback.
All reactions