Joe
Joe

Reputation: 63

Can't implement Google login with Next-auth.js

I'm having trouble getting google login works on my project with Next.js and Next-auth. Next.js: 13.2.4 Next-auth: 4.22.1 Here is my code so far: https://github.com/Suprefuner/airbnb-clone I keep getting 'PKCE code_verifier cookie was missing.' error or 'State cookie was missing.' error. Stuck for days, anyone knows how I can fix it? Thanks!!

Upvotes: 5

Views: 1027

Answers (1)

Daniel Pieczonka
Daniel Pieczonka

Reputation: 1

It may be a bit late to answer this, but please add: checks: ['none'] to your google provider as:

Google({
  clientId: process.env.GOOGLE_CLIENT_ID!,
  clientSecret: process.env.GOOGLE_CLIENT_SECRET!,  
  checks: ['none']
}),

Upvotes: 0

Related Questions