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

Apple provider TypeError: id_token not present in TokenSet #7795

Closed
gbtwld opened this issue Jun 13, 2023 · 5 comments
Closed

Apple provider TypeError: id_token not present in TokenSet #7795

gbtwld opened this issue Jun 13, 2023 · 5 comments
Labels
providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@gbtwld
Copy link

gbtwld commented Jun 13, 2023

Provider type

Apple

Environment

System:
OS: macOS 13.4
CPU: (8) arm64 Apple M1 Pro
Memory: 199.61 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.1.0 - ~/.nvm/versions/node/v18.1.0/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v18.1.0/bin/yarn
npm: 9.4.0 - ~/.nvm/versions/node/v18.1.0/bin/npm
Watchman: 2023.04.10.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 112.0.5615.137
Safari: 16.5

Reproduction URL

https://github.com/gbtwld/next-auth-sample/blob/main/%5B...nextauth%5D.ts

Describe the issue

The apple client secret was created and entered correctly. The same goes for callback urls. But I am running into these errors.

error: TypeError: id_token not present in TokenSet
at TokenSet.claims (/var/task/node_modules/openid-client/lib/token_set.js:28:13)
at oAuthCallback (/var/task/node_modules/next-auth/core/lib/oauth/callback.js:127:24)
at async Object.callback (/var/task/node_modules/next-auth/core/routes/callback.js:52:11)
at async AuthHandler (/var/task/node_modules/next-auth/core/index.js:208:28)
at async NextAuthApiHandler (/var/task/node_modules/next-auth/next/index.js:22:19)
at async NextAuth._args$ (/var/task/node_modules/next-auth/next/index.js:106:14) {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'apple',
message: 'id_token not present in TokenSet'
}

How to reproduce

Sign in with Apple provider.
Move to apple login web site.
Log in with my apple account.
come back to my sign in page and error occurs. (oauth callback error)

Expected behavior

Login should complete successfully.

@gbtwld gbtwld added providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jun 13, 2023
@gbtwld gbtwld changed the title [Apple provider] TypeError: id_token not present in TokenSet Apple provider TypeError: id_token not present in TokenSet Jun 13, 2023
@balazsorban44
Copy link
Member

duplicate of #4061

@gbtwld
Copy link
Author

gbtwld commented Jun 14, 2023

@balazsorban44 I checked that issue before open this. But That doesn't help.

@balazsorban44
Copy link
Member

Please don't open duplicate issues, as they create noise. If an issue is already opened, you can subscribe to that one, instead of adding an identical new issue. You can subscribe to open issues via the github ui.

If you have useful information to forward resolving the issue please post in the already opened one.

@achinth
Copy link

achinth commented Oct 7, 2023

There is no solution provided in #4061 . Has anyone found a solution for this issue?

@arunranga
Copy link

@achinth : while not quite a "solution" I think the notes in #6788 are helpful. Basically you cannot rely on the default configuration.

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

No branches or pull requests

4 participants