nextauthjs / nextauthjs/next-auth

DiscordProvider returns callbackrouteerror with TODO message

Open
#7,764 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Provider type

Discord

Environment

This is a solid-start app so I instead used the command:

npx envinfo --system --binaries --browsers --npmPackages "solid-start,solid-js,next-auth,@auth/*"
System:
    OS: macOS 13.4
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 3.48 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
    Watchman: 2023.05.22.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 114.0.5735.106
    Firefox: 113.0.2
    Firefox Developer Edition: 89.0
    Safari: 16.5
Reproduction URL

https://github.com/virtual-dnd/virtual-dnd

Describe the issue

Using the DiscordProvider following the guide in the docs results in the error above after the user click "authorize". Other providers seem to work fine?

How to reproduce
  1. Create new dev app from Discord developer tools
  2. Add a new .env.development.local file to the root of the project
  3. Add the DISCORD_CLIENT_ID, DISCORD_CLIENT_SECRET, and AUTH_SECRET fields to it
  4. Start up app via npm run dev and
  5. Click the Sign in button
  6. Choose Discord
  7. Click "Authorize"
  8. 🛑 SEE ERROR
Expected behavior

The DiscordProvider should work successfully after clicking the "authorize" button like the other providers.

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

Reproduce the issue using the virtual-dnd app and the listed Discord environment, then trace the DiscordProvider callback flow around the callbackrouteerror and its TODO message. Compare that path with providers that work; done means Discord authorization completes successfully without the callback error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.