FirebaseAuth.instance.currentUser 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: onstatechange firebase cant get stsTokenManager
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
user.getIdToken().then(function(idToken) {
console.log(idToken);
});
}
});