Skip to content

Instantly share code, notes, and snippets.

@carlosrojaso
Created January 13, 2018 17:48
Show Gist options
  • Save carlosrojaso/a344a73197d4cfdc0458a89e629976ea to your computer and use it in GitHub Desktop.
Save carlosrojaso/a344a73197d4cfdc0458a89e629976ea to your computer and use it in GitHub Desktop.
import { AngularFireAuth } from 'angularfire2/auth';
....
constructor(public afAuth: AngularFireAuth) { }
........
this.afAuth.authState.subscribe(res => {
if (res && res.uid) {
console.log('user is logged in');
} else {
console.log('user not logged in');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment