nextauthjs / next-auth

Authentication for the Web.
https://authjs.dev
ISC License
24.12k stars 3.34k forks source link

Discord provider challenge vs code verifier are different. #9435

Open fxmt-2009 opened 8 months ago

fxmt-2009 commented 8 months ago

Provider type

Discord

Environment

System: OS: Windows 11 10.0.22621 CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz Memory: 7.46 GB / 15.85 GB Binaries: Node: 20.6.1 - C:\Program Files\nodejs\node.EXE npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Chromium (120.0.2210.77) Internet Explorer: 11.0.22621.1

Reproduction URL

https://github.com/fxmt-2009/authjs4.git

Describe the issue

Discord authentication : using the discord provider produces an error code S256.

How to reproduce

build the app, enter your discord clientId and clientSecret for a discord app. Go to login page, click on continue with discord to authenticate using the discord provider. You will get an error S526.

Expected behavior

I should be authenticated and redirected to protected pages.

fxmt-2009 commented 8 months ago

I actually published the app so anyone can test it live instead of running the code and adding discord app id ..etc

Go to https://aicheck.me/login And click on continue with discord and view the error message in your console.

If you need to create your own discord app id and secret and test using your own, the repo is public. Download the code and run it locally.

What is the issue?