Skip to content

Apple has changed OIDC issuer without notice #13046

@TerraNibble

Description

@TerraNibble

Environment

❯ bun pm ls --all | grep next
REDACTED
├── @chakra-ui/next-js@2.2.0
├── @next/bundle-analyzer@13.5.6
├── @next/env@14.2.25
├── @next/eslint-plugin-next@13.4.19
├── @next/swc-darwin-arm64@14.2.25
├── @next/swc-darwin-x64@14.2.25
├── @next/swc-linux-arm64-gnu@14.2.25
├── @next/swc-linux-arm64-musl@14.2.25
├── @next/swc-linux-x64-gnu@14.2.25
├── @next/swc-linux-x64-musl@14.2.25
├── @next/swc-win32-arm64-msvc@14.2.25
├── @next/swc-win32-ia32-msvc@14.2.25
├── @next/swc-win32-x64-msvc@14.2.25
├── @polka/url@1.0.0-next.25
├── @sentry/nextjs@7.119.0
├── cookies-next@4.2.1
├── eslint-config-next@13.4.19
│   ├── resolve@2.0.0-next.5
├── next@14.2.25
├── next-auth@4.24.11

Reproduction URL

...

Describe the issue

Apple seems to have changed their expected OIDC issuer without any notice.

Observing the following error:

[next-auth][error][OAUTH_CALLBACK_ERROR] 
https://next-auth.js.org/errors#oauth_callback_error unexpected iss value, expected https://account.apple.com, got: https://appleid.apple.com {
  error: i: unexpected iss value, expected https://account.apple.com, got: https://appleid.apple.com
      at Y.validateJWT (/var/task/apps/.../.next/server/chunks/3092.js:34:8997)
      at Y.validateIdToken (/var/task/apps/.../.next/server/chunks/3092.js:34:6766)
      at Y.callback (/var/task/apps/.../.next/server/chunks/3092.js:34:3008)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async l (/var/task/apps/.../.next/server/chunks/3092.js:1:119414)
      at async Object.c (/var/task/apps/.../.next/server/chunks/3092.js:25:783)
      at async _ (/var/task/apps/.../.next/server/chunks/3092.js:1:103189)
      at async a (/var/task/apps/.../.next/server/chunks/3092.js:25:19776)
      at async e.length.t (/var/task/apps/.../.next/server/chunks/3092.js:25:21265)
      at async /var/task/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:6:38411 {
    name: 'OAuthCallbackError',
    code: undefined
  },
  providerId: 'apple',
  message: 'unexpected iss value, expected https://account.apple.com, got: https://appleid.apple.com'
}

How to reproduce

Setup an Apple provider sign in with the default expected setup. Attempt login.

Expected behavior

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalid reproductionThe issue did not have a detectable valid reproduction URLtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions