Ir a la consola

FirebaseUser

public abstract class FirebaseUser extends Object
implements Parcelable UserInfo

Represents a user's profile information in your Firebase project's user database. It also contains helper methods to change or retrieve profile information, as well as to manage that user's authentication state.

Inherited Constant Summary

Public Constructor Summary

Public Method Summary

Task<Void>
delete()
Deletes the user record from your Firebase project's database.
abstract String
getDisplayName()
Returns the main display name of this user from the Firebase project's user database.
abstract String
getEmail()
Returns the main email address of the user, as stored in the Firebase project's user database.
Task<GetTokenResult>
getIdToken(boolean forceRefresh)
Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend.
abstract FirebaseUserMetadata
getMetadata()
Returns the FirebaseUserMetadata associated with this user.
abstract String
getPhoneNumber()
Returns the phone number of the user, as stored in the Firebase project's user database, or null if none exists.
abstract Uri
getPhotoUrl()
Returns the URL of this user's main profile picture, as stored in the Firebase project's user database.
abstract List<? extends UserInfo>
getProviderData()
Returns a List of UserInfo objects that represents the linked identities of the user using different authentication providers that may be linked to their account.
abstract String
getProviderId()
Always returns PROVIDER_ID
abstract String
getUid()
Returns a string used to uniquely identify your user in your Firebase project's user database.
abstract boolean
isAnonymous()
Returns true if the user is anonymous; that is, the user account was created with signInAnonymously() and has not been linked to another account with linkWithCredential(AuthCredential).
Task<AuthResult>
linkWithCredential(AuthCredential credential)
Attaches the given AuthCredential to the user.
Task<Void>
reauthenticate(AuthCredential credential)
Reauthenticates the user with the given credential.
Task<AuthResult>
reauthenticateAndRetrieveData(AuthCredential credential)
Reauthenticates the user with the given credential, and returns the profile data for that account.
Task<Void>
reload()
Manually refreshes the data of the current user (for example, attached providers, display name, and so on).
Task<Void>
sendEmailVerification(ActionCodeSettings actionCodeSettings)
Initiates email verification for the user.
Task<Void>