I'm working on a project using Angular 4 and angularfire2 (firebase), i'm trying to navigate to the home page after the user signed in successfully using a third party (Google or Facebook).
The problem is after the user is authenticated using angularfire2 popup the router navigate properly ( link in the browser change and the home component is visible) but the sign in component still there !!
I'm not sure if the problem is related to angularfire2 sign in popoups or angular 4 itself, any suggestions ?
angularfire2 callback:
signInWithGoogle() {
this.angularFireAuth.auth.signInWithPopup(new
firebase.auth.GoogleAuthProvider()).then((infos) => {
this.router.navigate['/home'];
});
}
router config:
const memberSpaceRoutes: Routes = [
{ path: 'sign-in', component: SignInComponent },
{ path: 'home', component: Home},
]