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

InvalidCheck: pkceCodeVerifier value could not be parsed. (Oath Provider Error) #12345

Open
Lucifer472 opened this issue Dec 5, 2024 · 4 comments
Labels
bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@Lucifer472
Copy link

Provider type

GitHub, Google

Environment

System:
OS: macOS 15.1.1
CPU: (8) arm64 Apple M2
Memory: 305.41 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.8.3 - /opt/homebrew/bin/npm
bun: 1.1.38 - /opt/homebrew/bin/bun
Browsers:
Chrome: 131.0.6778.108
Safari: 18.1.1
npmPackages:
@auth/prisma-adapter: ^2.7.4 => 2.7.4
next: 15.0.3 => 15.0.3
next-auth: ^5.0.0-beta.25 => 5.0.0-beta.25
react: 19.0.0-rc-66855b96-20241106 => 19.0.0-rc-66855b96-20241106

Reproduction URL

https://github.com/Lucifer472/slack-clone

Describe the issue

[auth][error] InvalidCheck: pkceCodeVerifier value could not be parsed. Read more at https://errors.authjs.dev#invalidcheck
at parseCookie (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d_@auth_core_d1f52f..js:3030:15)
at Object.use (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d
@auth_core_d1f52f..js:3058:30)
at handleOAuth (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d
@auth_core_d1f52f..js:3288:247)
at async Module.callback (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d
@auth_core_d1f52f..js:3782:41)
at async AuthInternal (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d
@auth_core_d1f52f..js:4859:24)
at async Auth (/Users/truepubmedia/Desktop/sites/slack-clone/.next/server/chunks/e044d
@auth_core_d1f52f._.js:5120:34)
at async AppRouteRouteModule.do (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:10:33313)
at async AppRouteRouteModule.handle (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:10:40382)
at async doRender (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:1455:42)
at async responseGenerator (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:1814:28)
at async DevServer.renderToResponseWithComponentsImpl (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:1824:28)
at async DevServer.renderPageComponent (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:2240:24)
at async DevServer.renderToResponseImpl (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:2278:32)
at async DevServer.pipeImpl (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:960:25)
at async NextNodeServer.handleCatchallRenderRequest (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/next-server.js:281:17)
at async DevServer.handleRequestImpl (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/base-server.js:853:17)
at async /Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/dev/next-dev-server.js:373:20
at async Span.traceAsyncFn (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/trace/trace.js:153:20)
at async DevServer.handleRequest (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/dev/next-dev-server.js:370:24)
at async invokeRender (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/lib/router-server.js:183:21)
at async handleRequest (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/lib/router-server.js:360:24)
at async requestHandlerImpl (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/lib/router-server.js:384:13)
at async Server.requestListener (/Users/truepubmedia/Desktop/sites/slack-clone/node_modules/next/dist/server/lib/start-server.js:142:13)

Credentials Provider works like charm without any issues but Oath Providers are not working all the give the same error i tried different ways to sort it out but nothing works. i think the issue is with latest version on next js and prisma because i tried going to past version but same issue also the same config works perfectly fine in next js 14 i tried that

How to reproduce

Just clone the repo and added github client id and secret in env file also connect a database

Expected behavior

Github provider should redirect to authorized page then logged in to App.

@Lucifer472 Lucifer472 added bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Dec 5, 2024
@OtisTemler
Copy link

Same issue here, using Next.js 15.1.0 & React 19.

Sometimes works, sometimes doesn't with the above stated error.

@pr-citrate
Copy link

I encountered the same issue as you described with Next 15.1 and React 19.0. If you’ve found any potential workarounds or additional details since your post, I’d appreciate it if you could share them here!

@junheeLee96
Copy link

I also encountered the same error. In my case, I used Chrome's incognito mode to log in and found that the error disappeared.

@rubinpaudel
Copy link

I have the same issue with Notion, using these versions:

"next": "15.1.2",
"next-auth": "5.0.0-beta.25",
"react": "^19.0.0",

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

No branches or pull requests

5 participants