Skip to content
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

@auth/[email protected] onclick signIn/signOut causes SyntaxError: Unexpected token '<' #12775

Open
vkarisari opened this issue Mar 14, 2025 · 5 comments
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@vkarisari
Copy link

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.
@vkarisari vkarisari added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Mar 14, 2025
@tijptjik
Copy link

The issue might be related to the library POSTing to /signin/{provider} instead of /auth/signin/{provider} as it did before.

@xcaptain
Copy link

xcaptain commented Mar 18, 2025

Same here, why change the api, 1.7.4 works fine.

Find the pull request at: #12249

Maybe we should rollback to 1.7.4

@magnuslundin
Copy link

Same issue here. Rolling back to 1.7.4.

This change doesn't seem to be documented in the release.

@Padi2312
Copy link

Any updates on this issue ?
Does there come a patch version for the 1.8.0 ?

@vandmo
Copy link

vandmo commented Apr 3, 2025

const signInUrl = `${baseUrl}/${
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: 1c9bcdd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

6 participants