Open
Description
Provider type
Apple
Environment
❯ bun pm ls --all | grep next
REDACTED
├── @chakra-ui/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @next/[email protected]
├── @polka/[email protected]
├── @sentry/[email protected]
├── [email protected]
├── [email protected]
│ ├── [email protected]
├── [email protected]
├── [email protected]
Reproduction URL
https://github.com/TerraNibble/next-auth-example
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
Successful Apple OIDC login.