-
Notifications
You must be signed in to change notification settings - Fork 31
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
email_verified and is_private_email now returned as boolean by Apple's API? #39
Comments
Hey @mikebouwmans, Thank you for raising the issue! I've reviewed the code, and the problem is probably in the There is an e2e test that could be used to verify if your change works correctly. Simply replace the code:
With the:
And run the test with the valid token. |
I've tried using the e2e test but got the following error: But that seems unrelated to this issue. I have tried it using a valid token and your suggested change seems to work. Still wondering if Apple's api actually changed. Couldn't find anything online. |
I can't remember exactly how the app needs to be configured. The list of supported algorithms is taken from the API response [1]. It seems like the app generates token using If your change works and you are able to prove that with an e2e test, create a PR please 🙏🏼 |
Hi,
It looks like there was a possible change in Apple's API. It now seems the is_private_email and email_verified fields are now returned as boolean rather than a string. So the code in
vendor/azimolabs/apple-sign-in-php-sdk/src/Auth/Factory/AppleJwtStructFactory.php:27
is not right anymore.See response below: (I var_dumped $claims variable)
["email_verified"]=> bool(true) ["auth_time"]=> int(REDACTED) ["nonce_supported"]=> bool(true)
Not sure what's the best way to fix this, so submitting an issue. Possible a boolval() works?
The text was updated successfully, but these errors were encountered: