Skip to content

Instantly share code, notes, and snippets.

@zinyando
Last active May 5, 2017 10:38
Show Gist options
  • Save zinyando/f47df86e6733d79553d18277e7828221 to your computer and use it in GitHub Desktop.
Save zinyando/f47df86e6733d79553d18277e7828221 to your computer and use it in GitHub Desktop.
public open() {
  firebase.auth().signInWithPopup(provider).then((result) => {
        this._setSession(result);
        this.token = result.credential.accessToken;
        this.user = result.user;
        this.isAuthenticated = true;
        this.router.navigate(['/dashboard']);
      })
      .catch((error) => {
        this.router.navigate(['']);
      });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment