Get the currently signed-in user in firebase code example
Example 1: firebase user name java
FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
if (user != null) {
String name = user.getDisplayName();
String email = user.getEmail();
Uri photoUrl = user.getPhotoUrl();
boolean emailVerified = user.isEmailVerified();
String uid = user.getUid();
}
Example 2: firebase auth update current user
var user = firebase.auth().currentUser;user.updateProfile({ displayName: "Jane Q. User", photoURL: "https://example.com/jane-q-user/profile.jpg"}).then(function() {