nextauthjs / nextauthjs/next-auth

Incorrect URL in SignIn button on error page in NextAuth v5

Open
#12,740 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
TypeScript
Stars
28.4k
Forks
4k
PR merge metrics
No merged PRs in 30d

Description

Environment
"react": "18.2.0",
"next-auth": "5.0.0-beta.22",
"next": "^14.2.15",
Reproduction URL

https://github.com/yasuomang/next-auth-bug

Describe the issue

Image

I checked the source code and found that there's an issue with this URL.

Image

How to reproduce
  1. Click the expired magic link
  2. Click signin button
Expected behavior

Just link to /auth/signin or pages: { signIn: "http://localhost:3000/signin", }, if I set the pages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction URL and follow the expired magic-link flow described in the issue: click the error-page SignIn button and inspect its destination. Compare that URL with /auth/signin and the configured pages.signIn value; done means the button uses the expected sign-in URL in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, react, typescript
Domain
authentication, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.