As per the Developper documentation (https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms, paragraph Send the Required Query Parameters), I'm trying to get the user's name as long as I'm getting the authorization code.
My issue is quite straightforward: I never see any user's name in the request's response, even if the scope parameter is name%20email
or even name.
To provide more details, the request URL is:
[GET] https://appleid.apple.com/auth/authorize
and the query string is in form of:
response_type=code &response_mode=form_post &scope=name &client_id=***** &redirect_uri=***** &state=*****
The response is a JSON containing a id_token key
.
The matching value is a JWT whose payload, one base64-decoded, is on form of:
{ "iss": "https://appleid.apple.com", "aud": "*****", "exp": 1632208524, "iat": 1632122124, "sub": "*****", "at_hash": "*****", "email": "*****", "email_verified": "true", "is_private_email": "true", "auth_time": 1632122123, "nonce_supported": true }
Is the documentation irrelevant? Am I missing something?
Note: this kind of response is return when the user hides his email. Sharing the email doesn't impact the response structure, yet.