You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use two providers: Google and Apple.
I have one problem for each provider:
For Google:
[next-auth][error][OAUTH_CALLBACK_ERROR]
State cookie was missing
providerId: 'google',
message: 'State cookie was missing.'
For Apple:
[next-auth][error][OAUTH_CALLBACK_ERROR]
PKCE code_verifier cookie was missing.
providerId: 'apple',
message: 'PKCE code_verifier cookie was missing.'
These messages appear each time I log in to my application. It's not blocking, and users are able to log in. I'd like to understand the cause because I've already added a PKCE cookie to my next-auth.ts file.
This is polluting my environment's logs, and I'd like to fix it as soon as possible.
My next-auth.ts and next-auth.d.ts files in the link
Here are the versions used:
"next": "^14.2.20",
"next-auth": "^4.24.11",
"react": "18.2.0",
### How to reproduce
https://github.com/LoickNosal/Cookie-Missing-NextAuth
### Expected behavior
Shouldn't pollute my console with missing cookies errors.
The text was updated successfully, but these errors were encountered:
LoickNosal
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Apr 2, 2025
I also faced this using the Github Provider. I somehow fixed it. I deleted parts and started adding parts back in until the issue started to appear. It was caused due to parsing problem. I sent some mismatched data. I just had to handle that and its working again.
I would recommend you do the same while keeping this in mind. Best of luck and let me know if it helped.
Hello, thank you for your reply. Could I have more details on your parsing error?
I've run several tests, but I'm still having the same problem in production (and I can't reproduce it in a dev environment).
Environment
Reproduction URL
https://github.com/LoickNosal/Cookie-Missing-NextAuth
Describe the issue
Hello, I'm having a problem with NextAuth.
I use two providers: Google and Apple.
I have one problem for each provider:
[next-auth][error][OAUTH_CALLBACK_ERROR]
State cookie was missing
providerId: 'google',
message: 'State cookie was missing.'
[next-auth][error][OAUTH_CALLBACK_ERROR]
PKCE code_verifier cookie was missing.
providerId: 'apple',
message: 'PKCE code_verifier cookie was missing.'
These messages appear each time I log in to my application. It's not blocking, and users are able to log in. I'd like to understand the cause because I've already added a PKCE cookie to my next-auth.ts file.
This is polluting my environment's logs, and I'd like to fix it as soon as possible.
My next-auth.ts and next-auth.d.ts files in the link
Here are the versions used:
"next": "^14.2.20",
"next-auth": "^4.24.11",
"react": "18.2.0",
The text was updated successfully, but these errors were encountered: