I am building a Chrome extension with OAuth sign in features. In order to keep the same user base of an existing mobile app I am implementing Facebook, Google and Apple sign in.
Using the chrome.identity browser API I was able to implement the sign in for Facebook and Google without problems.
I am now trying to implement the same for Apple SignIn.
To do so I call the following url using the chrome.identity.launchWebAuthFlow method, which is expected to call the provided callback passing the provided redirect_uri plus the result as query string params:
Since I need the user email and name I added the scope "name email" to my parameters but this force me to use the responsemode: 'formpost' (as documented here https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms).
When responsemode is set to formpost the result data is not appended to the redirecturi, as a result the sign in works but I am not able to extract the information I need.
By removing the scope and using responsemode=query works (I am able to extract the idtoken from the returnuri) but I cannot extract the user email and name.
Is there a way to use the parameter response_mode: 'query' combined with scope='name email'?
Using the chrome.identity browser API I was able to implement the sign in for Facebook and Google without problems.
I am now trying to implement the same for Apple SignIn.
To do so I call the following url using the chrome.identity.launchWebAuthFlow method, which is expected to call the provided callback passing the provided redirect_uri plus the result as query string params:
Code Block https://appleid.apple.com/auth/authorize?client_id=XXXXXXX&redirect_uri=https%3A%2F%2FXXXXXXX.chromiumapp.org&response_mode=form_post&response_type=code%20id_token&scope=name%20email
Since I need the user email and name I added the scope "name email" to my parameters but this force me to use the responsemode: 'formpost' (as documented here https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms).
When responsemode is set to formpost the result data is not appended to the redirecturi, as a result the sign in works but I am not able to extract the information I need.
By removing the scope and using responsemode=query works (I am able to extract the idtoken from the returnuri) but I cannot extract the user email and name.
Is there a way to use the parameter response_mode: 'query' combined with scope='name email'?
-
—
CamronBeanie
Add a Comment@AleCat83 were you able to figure this out? I am unfortunately facing the same problem.