I will be receiving the email id and name when I have logged in with Apple login for the first time. Second time onwards we won't receive any email id & name details. So the first time we will be storing information in our local or server. That is working perfectly.
The issue is, If the user deletes the account and tries to log in with the same apple id again, the user won't get the email & name again.
Is there any way we can get the email id & username?
From setting the user can manually do it by disabling stop using apple id for our app. Is there any option to do that programmatically?
Hi sreenathtv,
When a user initially authenticates with their Apple ID for your app, this is considered an account creation event for your developer account. The user name is provided directly to the app and is not shared with Apple. However, the email address is included within the identity token:
A
String
value representing the user’s email address. The email address is either the user’s real email address or the proxy address, depending on their status private email relay service.
email_verified
A
String
orBoolean
value that indicates whether the service has verified the email. The value of this claim is always true, because the servers only return verified email addresses. The value can either be aString
(”true”
) or aBoolean
(true
).
is_private_email
A
String
orBoolean
value that indicates whether the email shared by the user is the proxy address. The value can either be aString
(”true” or
“false”) or a Boolean (
trueor
false`).
Please see Authenticating Users with Sign in with Apple for more information about this expected behavior:
While Apple provides the user’s email address in the identity token on all subsequent API responses, it doesn’t include other information about the user, such as their name. When you receive user information from the API response, immediately store it locally so your app can access it again in the event of a process or network failure.
Additionally, a user may revoke access for a developer by following the steps outlined in this Support page:
https://support.apple.com/en-us/HT210426
Once revoked, the next authorization will be considered an account creation event, yet the user ID and proxy email address (if provided), will remain the same for a given developer team.
Cheers,
Paris