getcurrentuser firebase web code example
Example 1: firebase get current user javascript
var user = firebase.auth().currentUser;
if (user) {
// User is signed in.
} else {
// No user is signed in.
}
Example 2: how to check the current user in firebase android
@Override
public void onStart() {
super.onStart();
FirebaseUser currentUser = mAuth.getCurrentUser();
if (currentUser == null) {
// No user is signed in
} else {
// User logged in
}
}