On my client mobile app I perform apple-id authorization and obtain IdentityToken from Apple server.
Now I want to send this IdentityToken (looks like string xJahN102mdPq2jHAiisPsla012nYahKL ) to my application server. And I want to get user's email on my application server via processing this token.
For google (for example) it is plain simple way, I just make a GET request to:
https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=google_identity_token
And in case the token is correct, Google returns JSON with the user's email inside.
What apple server endpoint should I call and what HTTP request should be done (GET, POST, etc) to obtain user's email using IdentityToken ?
Thank you.
As far as I understand the situation it is not possible. Instead of that I have to pass Identity token along with other credentials, including email, to my application server and perform 2 steps.
- Check passed data on integrity
- Call to Apple servers for refresh token
Details here: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/verifying_a_user