We have implemented a sign in with Apple(SiwA) for our iOS app. for the signup we require the user's Apple id and email address. We are getting user name and email details on first login attempts but after that to get the email we are decoding identity token and get the email address.
We observed that the identity token does not always contain the email address.
Please follow the below steps to reproduce the issue.
step 1: User clicks on Sign in with Apple button and it displays Apple authorization popup with details like name, share-email, and hide email option then in success response we get an email in received apple identity token.
step 2: Now user revoke signing access from the apple account by following steps (Setting -> Apple account -> Password & Security -> Apple id logins -> remove the app from options)
step 3: After step 2, User clicks again Sign in with the apple button and usually, it shows Authorization popup with details like step 1 and we got an email from the identity token in this case so we don't have any issue.
step 4: After step 2, the user clicks on the sign in with the Apple button and authorization popup contains only email address instead of a name, share email, or hide email options. In this case, we didn't get an email from the identity token.
The main problem is Authorization popup is not resetting after revoking access, it shows like previously logged-in state, and in this case, we don't get email otherwise we always get an email address from identity token.
Can we debug/identify why Authorization popup is not resetting after revoked access?
Any help would be appreciated.