We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The JWT tokens that Apple issues on the client side vary with regards to the used kid, for example they can be:
"kid": "86D88Kf", "kid": "eXaunmL", "kid": "AIDOPK1",
The code at the apple.js queries the Apple API on valid public keys and respective kids, which at this time returns
{ "keys": [ { "kty": "RSA", "kid": "86D88Kf", "use": "sig", "alg": "RS256", "n": "iGaLqP6y-SJCCBq5Hv6pGDbG_SQ11MNjH7rWHcCFYz4hGwHC4lcSurTlV8u3avoVNM8jXevG1Iu1SY11qInqUvjJur--hghr1b56OPJu6H1iKulSxGjEIyDP6c5BdE1uwprYyr4IO9th8fOwCPygjLFrh44XEGbDIFeImwvBAGOhmMB2AD1n1KviyNsH0bEB7phQtiLk-ILjv1bORSRl8AK677-1T8isGfHKXGZ_ZGtStDe7Lu0Ihp8zoUt59kx2o9uWpROkzF56ypresiIl4WprClRCjz8x6cPZXU2qNWhu71TQvUFwvIvbkE1oYaJMb0jcOTmBRZA2QuYw-zHLwQ", "e": "AQAB" }, { "kty": "RSA", "kid": "eXaunmL", "use": "sig", "alg": "RS256", "n": "4dGQ7bQK8LgILOdLsYzfZjkEAoQeVC_aqyc8GC6RX7dq_KvRAQAWPvkam8VQv4GK5T4ogklEKEvj5ISBamdDNq1n52TpxQwI2EqxSk7I9fKPKhRt4F8-2yETlYvye-2s6NeWJim0KBtOVrk0gWvEDgd6WOqJl_yt5WBISvILNyVg1qAAM8JeX6dRPosahRVDjA52G2X-Tip84wqwyRpUlq2ybzcLh3zyhCitBOebiRWDQfG26EH9lTlJhll-p_Dg8vAXxJLIJ4SNLcqgFeZe4OfHLgdzMvxXZJnPp_VgmkcpUdRotazKZumj6dBPcXI_XID4Z4Z3OM1KrZPJNdUhxw", "e": "AQAB" }, { "kty": "RSA", "kid": "AIDOPK1", "use": "sig", "alg": "RS256", "n": "lxrwmuYSAsTfn-lUu4goZSXBD9ackM9OJuwUVQHmbZo6GW4Fu_auUdN5zI7Y1dEDfgt7m7QXWbHuMD01HLnD4eRtY-RNwCWdjNfEaY_esUPY3OVMrNDI15Ns13xspWS3q-13kdGv9jHI28P87RvMpjz_JCpQ5IM44oSyRnYtVJO-320SB8E2Bw92pmrenbp67KRUzTEVfGU4-obP5RZ09OxvCr1io4KJvEOjDJuuoClF66AT72WymtoMdwzUmhINjR0XSqK6H0MdWsjw7ysyd_JhmqX5CAaT9Pgi0J8lU_pcl215oANqjy7Ob-VMhug9eGyxAWVfu_1u6QJKePlE-w", "e": "AQAB" } ] }
The current implementation (commit 4620926) of the token verification only fetches the first key, sent by Apple
const key = data.keys[0];
Thus failing verification every time a token with a different kid than the first one is returned.
Grab an id token from Sign in with Apple
Verify that its kid is different from the first element of the array that apple returns from this API - Apple API
Use the current Parse Server version to verify it code
The token should be verified, regardless of the provided kid
The token verification fails, even though the token is valid
The text was updated successfully, but these errors were encountered:
The label type:feature cannot be used in combination with type:improvement.
type:feature
type:improvement
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Issue Description
The JWT tokens that Apple issues on the client side vary with regards to the used kid, for example they can be:
The code at the apple.js queries the Apple API on valid public keys and respective kids, which at this time returns
The current implementation (commit 4620926) of the token verification only fetches the first key, sent by Apple
const key = data.keys[0];
Thus failing verification every time a token with a different kid than the first one is returned.
Steps to reproduce
Grab an id token from Sign in with Apple
Verify that its kid is different from the first element of the array that apple returns from this API - Apple API
Use the current Parse Server version to verify it code
Expected Results
The token should be verified, regardless of the provided kid
Actual Outcome
The token verification fails, even though the token is valid
Environment Setup
Logs/Trace
The text was updated successfully, but these errors were encountered: