@auth/[email protected] onclick signIn/signOut causes SyntaxError: Unexpected token '<'
Environment
System:
OS: Windows 11 10.0.26100
CPU: (12) x64 Intel(R) Xeon(R) E-2176G CPU @ 3.70GHz
Memory: 12.86 GB / 31.86 GB
Binaries:
Node: 22.12.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.1.1 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Chrome: 134.0.6998.89
Edge: Chromium (133.0.3065.92)
Internet Explorer: 11.0.26100.1882```
### Reproduction URL
https://github.com/vkarisari/svauth180-bug
### Describe the issue
I have a signin/signout button that throws SyntaxError: Unexpected token '<' when clicking. The buttons calls signOut/signIn from @auth/sveltekit/client. This is on version 1.8.0. I downgraded to 1.7.4 and it worked just fine.
### How to reproduce
Check the github repo, or go to https://svauth180-bug.vercel.app/ and blick the buttons.
### Expected behavior
Redirect to login/logout page.
The issue might be related to the library POSTing to /signin/{provider} instead of /auth/signin/{provider} as it did before.
Same here, why change the api, 1.7.4 works fine.
Find the pull request at: https://github.com/nextauthjs/next-auth/pull/12249
Maybe we should rollback to 1.7.4
Same issue here. Rolling back to 1.7.4.
This change doesn't seem to be documented in the release.
Any updates on this issue ? Does there come a patch version for the 1.8.0 ?
https://github.com/nextauthjs/next-auth/blob/ca30e90eb403d174d3398f79c8eba5217fe15db6/packages/frameworks-sveltekit/src/lib/client.ts#L89 now goes to {base}/signin instead of {base}/auth/signin . Not sure if intentional but the server side handler expects auth in the prefix.
Any input on this @balazsorban44 ? It was changed in this commit: https://github.com/nextauthjs/next-auth/commit/1c9bcdd0c4538a852f8d2b2b7c60eb962e3a50eb
Any updates on this issue ? Does there come a patch version for the 1.8.0 ?
Confirmed that it is not fixed as of 1.9.0
Confirmed that it is not fixed in 1.9.1.