UserInfo

public interfaceUserInfo

Known direct subclasses
FirebaseUser

Represents a user's profile information in your Firebase project's user database.


Represents a collection of standard profile information for a user. Can be used to expose profile information returned by an identity provider, such as Google Sign-In or Facebook Login.

Summary

Public methods

abstract @NullableString

Returns the user's display name, if available.

abstract @NullableString

Returns the email address corresponding to the user's account in the specified provider, if available.

abstract @NullableString

Returns the phone number corresponding to the user's account, if available, ornull if none exists.

abstract @NullableUri

Returns aUri to the user's profile picture, if available.

abstract @NonNullString

Returns the unique identifier of the provider type that this instance corresponds to.

abstract @NonNullString

Returns a user identifier as specified by the authentication provider.

abstract boolean

Returnstrue if the user's email is verified.

Public methods

getDisplayName

abstract @NullableString getDisplayName()

Returns the user's display name, if available.

getEmail

abstract @NullableString getEmail()

Returns the email address corresponding to the user's account in the specified provider, if available. Some authentication providers, like Twitter, do not contain an email address. Others, like Facebook Login, contain it optionally.

getPhoneNumber

abstract @NullableString getPhoneNumber()

Returns the phone number corresponding to the user's account, if available, ornull if none exists.

getPhotoUrl

abstract @NullableUri getPhotoUrl()

Returns aUri to the user's profile picture, if available.

getProviderId

abstract @NonNullString getProviderId()

Returns the unique identifier of the provider type that this instance corresponds to. For example,PROVIDER_ID orPROVIDER_ID.

getUid

abstract @NonNullString getUid()

Returns a user identifier as specified by the authentication provider. For example, if this object corresponds to a Google user, returns a Google user ID. For phone number accounts, the UID will be the normalized phone number in E.164 format.

isEmailVerified

abstract boolean isEmailVerified()

Returnstrue if the user's email is verified.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.