I am following the instructions here https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/configuring_your_webpage_for_sign_in_with_apple
Unfortunately I am not able to receive user data
A JSON string containing the data requested in the scope property. The returned data is in the following format: { "name": { "firstName": string, "lastName": string }, "email": string }
when usePopup is set to true.
I defined scopes as described in documentation
Use space separation when requesting multiple scopes; for example, "scope=name email".
User data is returned correctly when usePopup is set to false but then every time we have to enter AppleId which was the reason why our app was rejected by the Apple reviewer.
After research I have found that the problem is with response_mode, it needs to be set to form_post rather than web_message what is also described here ->
https://developer.apple.com/forums/thread/118209
We only support response_mode "form_post". we will make form_post as default and remove redirect. In the meantime please add &response_mode =form_post in the request
by Natthakorn123.
There is no way to define response_mode=form_post in AppleID.auth.init while usePopup is true because it is automatically overwritten by embedded Sign in with Apple JS to web_message.
t=e.usePopup?t+"&response_mode="+encodeURIComponent("web_message"):t+"&response_mode="+encodeURIComponent(e.responseMode)
How to fetch additional user data in authorization response using embedded Sign in with Apple JS while usePopup is true ?