问题
I am trying to do google plus native firebase authentication. When i click my login button it asks me to choose account and after that. Instead of redirecting me to the app it takes me to "www.google.com"
I have tried clicking "Done" after it takes me to "www.google.com". It then closes the popup and says "the user cancelled the operation". What do please
Here is my sign in code
googleNativeLogin() {
return new Promise((resolve, reject) => {
this.googlePlus.login(
{
'webClientId': 'XXXXXXXXXXXXX',
'scopes': '',
'offline': true
}
).then((response) => {
const googleCredential = firebase.auth.GoogleAuthProvider.credential(response.idToken);
firebase.auth().signInWithCredential(googleCredential)
.then((user) => {
this.presentToast(user)
resolve(user);
}).catch((err) =>{
reject(err);
});
}, (err) => {
reject(err);
this.presentToast(err)
});
})
}
I want to be redirected to the app after i choose an account. I dont want to be taken to "www.google.com"
回答1:
Hello I was facing this issue and this helped me out I hope it works for you too https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/565#issuecomment-499862324
来源:https://stackoverflow.com/questions/56411487/i-am-taken-to-www-google-com-after-sign-in-with-google-cordova