Version info
Angular: 9.0.0-rc.13
Firebase: 7.8.0
AngularFire: 6.0.0-rc.0
How to reproduce these conditions
I have updated from @angular/fire 5 to 6 and adjusted my application like mentioned in https://github.com/angular/angularfire/blob/master/CHANGELOG.md
But it seems that @angular/fire/auth has even more breaking changes like mentioned. The documentation is the same for v6 like for v5 (https://github.com/angular/angularfire/blob/master/docs/auth/getting-started.md)
The example in documentation still says:
constructor(public afAuth: AngularFireAuth) {
}
login() {
this.afAuth.auth.signInWithPopup(new auth.GoogleAuthProvider());
}
logout() {
this.afAuth.auth.signOut();
}
But then it says: Property 'auth' does not exist on type 'AngularFireAuth'.
And it's right -> auth isn't anymore in https://github.com/angular/angularfire/blob/master/src/auth/auth.ts
You only return the auth (return ɵlazySDKProxy(this, auth, zone);)
So is it correct to write this.afAuth.signOut(); ?
But then everything is a promise. In v5 I could write: "const current = this.afAuth.auth.currentUser;", but in v6 it's a promise -> "const current = await this.afAuth.auth.currentUser"
Version info
Angular: 9.0.0-rc.13
Firebase: 7.8.0
AngularFire: 6.0.0-rc.0
How to reproduce these conditions
I have updated from
@angular/fire5 to 6 and adjusted my application like mentioned in https://github.com/angular/angularfire/blob/master/CHANGELOG.mdBut it seems that
@angular/fire/authhas even more breaking changes like mentioned. The documentation is the same for v6 like for v5 (https://github.com/angular/angularfire/blob/master/docs/auth/getting-started.md)The example in documentation still says:
But then it says:
Property 'auth' does not exist on type 'AngularFireAuth'.And it's right -> auth isn't anymore in https://github.com/angular/angularfire/blob/master/src/auth/auth.ts
You only return the auth (
return ɵlazySDKProxy(this, auth, zone);)So is it correct to write
this.afAuth.signOut();?But then everything is a promise. In v5 I could write: "
const current = this.afAuth.auth.currentUser;", but in v6 it's a promise -> "const current = await this.afAuth.auth.currentUser"