logOut(e: Event) { e.preventDefault(); if (this.hasAuth) { this.auth.logOut(); this.router .navigate("/"); } }
private ensureAuth(provider: string) { this.auth.ensureAuth(provider) .then(() => { this.loginError = null; this.router.parent.navigate("/home"); }) .catch((error: Error) => { this.loginError = error.message; }); }