@charlescc wrote:
Hello,
I’m updating my app to ionic 4, and trying to login with google plus, but the function googlePlus.login() doesn’t seem to work. Even in a try{}catch{}, there is no error showing up…
my code :
async signInWithGoogle() { console.log('afAuth.signInWithGoogle()') if (this.plt.is('cordova')) { console.log('cordova') try { const gplusUser = await this.googlePlus.login({ 'webClientId': 'MYWEBCLIENTID.apps.googleusercontent.com', 'offline': true }) console.log(gplusUser) return await this.afAuth.auth.signInWithCredential(firebase.auth.GoogleAuthProvider.credential(gplusUser.idToken)) } catch(err) { console.log(err) return {'error' : err} } } else { return this.oauthSignIn(new firebase.auth.GoogleAuthProvider()); } }
this is what the console returns :
afAuth.signInWithGoogle() cordova
I haven’t changed my app id or sha1 certificate.
my ionic info
Ionic: ionic (Ionic CLI) : 4.7.1 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-rc.1 @angular-devkit/build-angular : 0.11.4 @angular-devkit/schematics : 7.1.4 @angular/cli : 7.1.4 @ionic/angular-toolkit : 1.2.2 Capacitor: capacitor (Capacitor CLI) : 1.0.0-beta.13 @capacitor/core : 1.0.0-beta.13 Cordova: cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0, browser 5.0.4, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 15 other plugins) System: ios-deploy : 2.0.0 NodeJS : v10.3.0 (/usr/local/Cellar/node/10.3.0/bin/node) npm : 6.1.0 OS : macOS Mojave Xcode : Xcode 9.4.1 Build version 9F2000
Hope you can help me
Posts: 1
Participants: 1