Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using signinWithPopup for Google login in my Angular app and everything works fine. It looks like this:

  doGoogleLogin(){
    return new Promise<any>((resolve, reject) => {
      let provider = new firebase.auth.GoogleAuthProvider();
      provider.addScope('profile');
      provider.addScope('email');
      this.afAuth
      .signInWithPopup(provider)
      .then(res => {
        this.router.navigate([{outlets: {modal: null}}], { queryParamsHandling: 'merge', relativeTo: this.activatedRoute.parent}).then(()=>{
        this.notificationService.showSuccess('Logged In', 'You are now logged in.');
      }); // NAVIGATES BACK TO WWW.MYAPP.COM
      }, err => {
        // console.log(err);
      })
    })
  }

However, it doesn't work in my PWA version of it that I have installed on Android. Popup with 'Sign in - Google Accounts' opens, I click on my mail address, and it redirects me to myapp.firebaseapp.com/_auth/handler?state=AMBjfrojirjETC (the page is hosted on firebase) - however, the page is blank and doesn't get redirected to www.myapp.com (in web app everything works fine). When I close it, I'm back in my PWA and the login didn't happen. It's my first PWA and have no idea what goes wrong.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.1k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...