I am using @angular/fire 5.2.2 when a trying to login with google provider, 
into credential (param email is null).

Some time ago I was working perfectly.
But upgrade from angular 6 to 8.
Maybe there could be some kind of problem in the update.

this is my code.


AuthLogin(provider) {
   return this.afAuth.auth.signInWithPopup(provider)
     .then(credential => {

        const user: User = {
         displayName: credential.user.displayName,
         email: credential.user.email,
         phoneNumber: credential.user.phoneNumber,
         photoURL: credential.user.photoURL,
         publish: false,
         roles: [Roles.Provider],
         emailVerified: true,
         refreshToken: credential.user.refreshToken,
         parentId: null,
         uid: credential.user.uid
       };

        this.SetUserData(user);
       this.currentUserSubject.next(user);
     });
 }



// Sign in with Google
 GoogleAuth() {
   const provider = new auth.GoogleAuthProvider();
   provider.addScope('profile');
   provider.addScope('email');

    return this.AuthLogin(new auth.GoogleAuthProvider());
 }


-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/5c709aa6-1566-4d59-b0cf-5356b9b359c4%40googlegroups.com.

Reply via email to