nextauthjs / nextauthjs/next-auth
`/auth/csrf` 404 on Vercel with SvelteKitAuth
@ThangHuuVu is already working on this.
Since Apr 3, 2023.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
Environment
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M2
Memory: 1.78 GB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
Browsers:
Chrome: 111.0.5563.146
Firefox: 111.0
Safari: 16.3
Reproduction URL
https://github.com/ColinLienard/gitlight/tree/fix/vercel-auth
Describe the issue
When trying to sign in, I get this error: GET https://....vercel.app/auth/csrf 404 and nothing happens. I don't have this issue in dev nor when doing build then preview, but only in production on Vercel.
I'm using @auth/core and @auth/sveltekit. I use sveltekit with the static adapter because this is required for Tauri
How to reproduce
The latest deployment: https://gitlight-72vcvyxb2-colinlienard.vercel.app/
Click on Sign in and open the console, you should see the error.
My repo: https://github.com/ColinLienard/gitlight/tree/fix/vercel-auth
Expected behavior
The user should authenticate with GitHub
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.