0
votes

I have a question about firebase connection.

When using e.g. signInWithEmailAndPassword in my ionic project, suddenly the function does not give any answers - no error and result.

My code looks like this.

login(email, password) {
    this.loadingProvider.show();
    this.afAuth.auth.signInWithEmailAndPassword(email, password).then((res) => {
      console.log(res)
      localStorage.setItem('isLoggedIn', 'true');
      this.router.navigateByUrl('/');
      this.loadingProvider.hide();
    }).catch(err => {
      console.log(err);
      this.loadingProvider.hide();
      this.loadingProvider.showToast(err.message)
    })
  }

I'm struggeling very hard to find out where the error is, but I don't get any response from all the firebase functions.

Did someone have the same issue and could solve it? I didn't change any credentials of my firebase database or the app itself.

Right now I'm a bit stuck. Any hits are welcome.

Thank you for your help.

my environment:

Ionic:

Ionic CLI : 6.11.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 4.9.1 @angular-devkit/build-angular : 0.803.24 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 ([email protected]) Cordova Platforms : none Cordova Plugins : no whitelisted plugins (1 plugins total)

Utility:

cordova-res (update available: 0.15.1) : 0.3.0 native-run : not installed

System:

ios-deploy : 1.9.2 ios-sim : 8.0.2 NodeJS : v10.15.1 (/usr/local/bin/node) npm : 6.14.5 OS : macOS Catalina Xcode : Xcode 11.5 Build version 11E608c Cheers

1

1 Answers

0
votes
this.afAuth.signInWithEmailAndPassword(email, password)...

Please remove .auth and try it like this, it should work.