Hi everyone!
We recently integrated "Sign in with Apple" into our application using standard social login flows. For the vast majority of our users, the integration works perfectly—we receive the user's email during sign-in and sign-up.
However, we are noticing an edge case where a small subset of users are returning an ID token that is completely missing the email.
We can't seem to reproduce this error ourselves during testing. Every time we test a sign-up or sign-in, the email payload is included exactly as expected.
My Questions:
Is there a specific reason why Apple would omit the email claim from the ID token?
Any insights or guidance would be greatly appreciated. Thank you!
Hi @erlendgje,
You wrote:
Is there a specific reason why Apple would omit the email claim from the ID token?
Not all Sign in with Apple accounts have an email, even if you request it. For instance, see the following note in the documentation below:
Note
If the user signs in with a managed Apple Account, the value of the
Receiving a User's Identity Token
https://developer.apple.com/documentation/signinwithapple/receiving-a-users-identity-token
Another common scenario, is for Apple Accounts, created in mainland China or India, that don't require an email address and, instead, use a phone number. To learn more, see below:
Using your phone number for Apple Account instead of an email address
https://support.apple.com/en-us/105034
Cheers,
Paris X Pinkney | WWDR | DTS Engineer