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

PKCE code_verifier cookie was missing in development #9990

Open
trevorpfiz opened this issue Feb 10, 2024 · 14 comments
Open

PKCE code_verifier cookie was missing in development #9990

trevorpfiz opened this issue Feb 10, 2024 · 14 comments
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@trevorpfiz
Copy link

Environment

System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
Memory: 7.12 GB / 9.72 GB
Container: Yes
Shell: 5.8 - /usr/bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
pnpm: 8.15.1 - ~/.local/share/pnpm/pnpm
bun: 1.0.14 - ~/.local/share/pnpm/bun
Watchman: 2024.01.22.00 - /home/linuxbrew/.linuxbrew/bin/watchman

Reproduction URL

https://github.com/trevorpfiz/create-t3-turbo/tree/main

Describe the issue

adding pkceCodeVerifier cookie gives error PKCE code_verifier cookie was missing when using Google or Discord providers in development.

How to reproduce

add

pkceCodeVerifier: {
    name: 'next-auth.pkce.code_verifier',
    options: {
      httpOnly: true,
      sameSite: 'none',
      path: '/',
      secure: process.env.NODE_ENV === 'production',
    },
  },

see error when trying to login in during development with Discord or Google.

Expected behavior

I would expect no error like in production.

@trevorpfiz trevorpfiz added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Feb 10, 2024
@marlon307
Copy link

marlon307 commented Feb 17, 2024

I have the same problem but to authenticate on my subdomains

Link teste

@leo3linbeck
Copy link

Same problem with Auth0 provider.

@daved-gowithhero

This comment has been minimized.

@DuanTranHuy
Copy link

same problem with google provider nextauth v5

@wade-liwei
Copy link

same problem with github provider nextauth v5

@serethomas
Copy link

Same problem with github provider and google provider on next-auth": "5.0.0-beta.17". Has anyone found a solution?

@DeepaPrasanna
Copy link

I am using github provider and followed the documentation as it is and facing the exact same issue!

@zhefciad

This comment has been minimized.

@DeepaPrasanna
Copy link

I have the same problem. Any fixes?

Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!

i have switched to supabase auth

@jonoise
Copy link

jonoise commented May 20, 2024

remove cookies from the browser. that fixed it for me.

@yeasin-2002
Copy link

I'm also getting the same error,
I'm using OAuth and google provider

image

@zhefciad
Copy link

I fixed my problem by changing NEXTAUTH_URL in env.local from 127.0.0.1 to localhost.

@pedrobando
Copy link

remove cookies from the browser. that fixed it for me.

THANK YOUUUUUUUU

@itschip
Copy link

itschip commented Jun 24, 2024

@trevorpfiz did you figure this one out? And if not, can I see your DiscordProvider config?

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

No branches or pull requests