-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Version info
**Angular: 10
**Firebase: ^7.16.0
**AngularFire: ^6.0.2
**Other (e.g. Ionic/Cordova, Node, browser, operating system): Angular web app
How to reproduce these conditions
When the auth is succeeded and get redirected to the angular code all request to the cloud firestore doesn't work
I have a method that work fine in Angular 8 : when the user is authentified by (google,Microsoft or Facebook) i get the information and i pushed it to the databse (cloud firestore)
Steps to set up and reproduce
constructor(private afAuth: AngularFireAuth, private afs: AngularFirestore)
this.afAuth.getRedirectResult().
.then(
async (result) => {
console.log(result);
if (result.credential) {
// all this code to save user info in firestore does'nt work any more
await this.afs.doc(users/${result.user.uid}
)
.set(
{ email: result.user.email, emailVerified: true, fullname: result.user.displayName },
{ merge: true }
);
}
}
);
So this method does'nt work any more, when i upgrade to Angular 10
But, when i do that :
-->I import * as firebase from 'firebase';
-->I replace this.afAuth.getRedirectResult() by firebase.auth().getRedirectResult()
Then all it works like expected
or when i use signinwithpopu inside, all it works, I think you have a problem with ngZone
Sample data and security rules
Debug output
Nothing happens
Expected behavior
It should push the return data of the authentication to the firestore in the promise of the getredirectResult without problem
Actual behavior
nothing happen When i pushed the return data of the authentication to the firestore in the promise of the getredirectResult , i have no error, no success, like the function, doesn't exist