I\'m trying to logout and then navigate to a login url, but the authguard from this url prevents logged users to view it and since the second line is reached before the prom
This has now been replaced with signOut() which returns a firebase promise. So if you import import { AngularFireAuth } from 'angularfire2/auth';
signOut()
import { AngularFireAuth } from 'angularfire2/auth';
you can then
constructor(public afA: AngularFireAuth){} logout(){ this.afA.auth.signOut().then(() => { this.router.navigate(['']); }); }