New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sign In page Buttons don't respect basePath when clicked #10009
Comments
jenewland1999
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Feb 12, 2024
Joshwantt
added a commit
to Joshwantt/jsohdev-site
that referenced
this issue
Feb 13, 2024
next-auth beta 9 looks to introduce a bug for all auth routes when a AUTH_URL env is supplied nextauthjs/next-auth#10009
Still an issue with beta.11 |
I am facing the same issue on version |
3 tasks
3 tasks
Same here |
Same issue also on v5 beta.17 |
Workaround here:
References: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
System:
OS: macOS 14.3.1
CPU: (8) arm64 Apple M1 Pro
Memory: 1.34 GB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/Library/Caches/fnm_multishells/47131_1707656901311/bin/node
Yarn: 1.22.21 - ~/Library/Caches/fnm_multishells/47131_1707656901311/bin/yarn
npm: 10.2.4 - ~/Library/Caches/fnm_multishells/47131_1707656901311/bin/npm
pnpm: 8.15.1 - ~/Library/pnpm/pnpm
bun: 1.0.26 - ~/.bun/bin/bun
Browsers:
Chrome: 121.0.6167.160
Safari: 17.3.1
npmPackages:
next: ^14.1.0 => 14.1.0
next-auth: 5.0.0-beta.9 => 5.0.0-beta.9
react: ^18.2.0 => 18.2.0
Reproduction URL
https://github.com/jenewland1999/next-auth-bug-repro
Describe the issue
Using the
basePath
option in Next.js does not currently work with the latest beta of NextAuth.js.This is because when you're taken to the sign in or sign out page, clicking the button will send you to a URL that does not include the
basePath
. Setting thebasePath
option in NextAuth.js does not affect this.Furthermore, the use of the
AUTH_URL
environment variable causes all the endpoints NextAuth.js creates to return the following error message:How to reproduce
http://localhost:3000/foo
You will now be on a 404 page.
Expected behavior
The
basePath
is taken into account when clicking the sign in or sign out button on the inbuilt pages. And specifying AUTH_URL also doesn't return the above error message.The text was updated successfully, but these errors were encountered: