how to get current logged in user 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: update photoURL firebase
this.$fireAuth.currentUser.updateProfile({
displayName: '',
photoURL: '',
email: ''
})
.then((r) => {
console.log(r)
})
.catch((e) => {
console.log(e)
})