I am successfully integrated firebase google auth web. I was getting this below response. how can i get only additionalUserInfo in js This is response after successfully sign in This is code
function googleSignin() {
base_proveider =new firebase.auth.GoogleAuthProvider()
firebase.auth().signInWithPopup(base_proveider).then(function(result){
console.log(result)
console.log("success google account linked")
}).catch(function(err){
console.log(err)
console.log('fialed to do')
})
}
As you can read in the doc for
signInWithPopup()
, it returns a Promise which resolves with aUserCredential
, which is "a structure containing aUser
, anAuthCredential
, theoperationType
, and any additional user information that was returned from the identity provider".因此,您必须执行以下操作: