I am taken to “www.google.com” after sign in with google cordova

我与影子孤独终老i 提交于 2019-12-11 14:09:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!