I am trying to add scope and access more properties of the signed in user from Facebook. However, Firebase 3 sdk seems to not be clear on that.
provider = new firebase.auth.FacebookAuthProvider();
provider.addScope('public_profile, email, gender, user_birthday');
firebase.auth().signInWithPopup(provider).then((result) => {
var token = result.credential.accessToken;
var user = result.user; // doesn't have any extra information
});
Has anyone figured out how to access additional scope?
The additional scope data are currently not available via firebase user. You will need to get the returned access token from result.credential.accessToken and then call the facebook api to get that additional data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With