import {Injectable, OnInit, NgZone} from '@angular/core';
import {AuthInterface} from './auth';
var provider = new firebase.auth.GithubAuthProvider();
@Injectable()
export class AuthService implements AuthInterface {
constructor(private ngZone : NgZone) {}
public isAuthenticated : boolean;
public open() {
firebase.auth().signInWithPopup(provider).then((result) => {
this.ngZone.run(() => {
...
this.isAuthenticated = true;
});
});
}
}
Last active
May 4, 2017 15:53
-
-
Save zinyando/5a5e5a6a5c59dcd1ab8351dead7aa62f to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment