Skip to content

Official website demo couldn't signin with apple #12883

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

Open
georgezouq opened this issue Apr 17, 2025 · 0 comments
Open

Official website demo couldn't signin with apple #12883

georgezouq opened this issue Apr 17, 2025 · 0 comments
Labels
bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@georgezouq
Copy link

Provider type

Apple

Environment

System:
    OS: macOS 15.3.2
    CPU: (14) arm64 Apple M4 Pro
    Memory: 765.44 MB / 48.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.7 - ~/.nvm/versions/node/v18.20.7/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.7/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v18.20.7/bin/npm
    pnpm: 9.2.0 - ~/Library/pnpm/pnpm
    bun: 1.2.5 - ~/.bun/bin/bun
  Browsers:
    Chrome: 135.0.7049.95
    Safari: 18.3.1

Reproduction URL

https://github.com/georgezouq/next-auth

Describe the issue

On my nextjs project, I have "PKCE code_verifier cookie missing" problem use apple provide, and I find official demo in next-auth website still couldn't signin with apple!

In my local, it report an error:

error: TypeError: PKCE code_verifier cookie was missing.
at Object.use (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next-auth/core/lib/oauth/checks.js:60:30)
at oAuthCallback (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next-auth/core/lib/oauth/callback.js:75:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.callback (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next-auth/core/routes/callback.js:45:11)
at async AuthHandler (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next-auth/core/index.js:260:28)
at async NextAuthApiHandler (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next-auth/next/index.js:18:19)
at async auth (webpack-internal:///(api)/./src/pages/api/auth/next/[...nextauth].ts:26:12)
at async Object.apiResolver (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next/dist/server/api-utils/node.js:366:9)
at async DevServer.runApi (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next/dist/server/next-server.js:481:9)
at async Object.fn (/Users/georgezou/Documents/WORK/StaringAI/mtbird-saas/node_modules/next/dist/server/next-server.js:741:37) {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'apple'
}

And I add or remove cookies blow what #9990 (comment) said, it doesn't work

pkceCodeVerifier: {
            name: `${COOKIE_PREFIX}next-auth.pkce.code_verifier`,
            options: {
              httpOnly: true,
              sameSite: 'lax',
              path: '/',
              secure: true,
              maxAge: COOKIES_LIFE_TIME,
            },
          },

How to reproduce

open https://next-auth-example.vercel.app/ -> click Sign In button -> click Apple
I got this error

Expected behavior

signin in like other oauth provider

@georgezouq georgezouq added bug Something isn't working providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Apr 17, 2025
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

1 participant