I have an ionic2 app and am using Firebase and angularFire2. I\'d like to get the current authentication state and current auth object/user from firebase using angularFire2.
import { AngularFireAuth } from 'angularfire2/auth';
constructor(public afAuth: AngularFireAuth) { }
Check:
this.afAuth.authState.subscribe(res => { if (res && res.uid) { console.log('user is logged in'); } else { console.log('user not logged in'); } });