A user account.

Index

Properties

displayName

displayName: string | null

email

email: string | null

emailVerified

emailVerified: boolean

isAnonymous

isAnonymous: boolean

metadata

metadata: UserMetadata

multiFactor

multiFactor: MultiFactorUser

The firebase.User.MultiFactorUser object corresponding to the current user. This is used to access all multi-factor properties and operations related to the current user.

phoneNumber

phoneNumber: string | null

The phone number normalized based on the E.164 standard (e.g. +16505550101) for the current user. This is null if the user has no phone credential linked to the account.

photoURL

photoURL: string | null

providerData

providerData: UserInfo[]

providerId

providerId: string

refreshToken

refreshToken: string

tenantId

tenantId: string | null

The current user's tenant ID. This is a read-only property, which indicates the tenant ID used to sign in the current user. This is null if the user is signed in from the parent project.

example
// Set the tenant ID on Auth instance.
firebase.auth().tenantId = ‘TENANT_PROJECT_ID’;

// All future sign-in request now include tenant ID.
firebase.auth().signInWithEmailAndPassword(email, password)
  .then(function(result) {
    // result.user.tenantId should be ‘TENANT_PROJECT_ID’.
  }).catch(function(error) {
    // Handle error.
  });

uid

uid: string

The user's unique ID.

Methods

delete

getIdToken

getIdTokenResult

linkAndRetrieveDataWithCredential

linkWithCredential

linkWithPhoneNumber

linkWithRedirect

reauthenticateAndRetrieveDataWithCredential

reauthenticateWithCredential

reauthenticateWithPhoneNumber

reload

sendEmailVerification

toJSON

  • unlink ( providerId string ) : Promise < User >
  • Unlinks a provider from a user account.

    Error Codes

    auth/no-such-provider
    Thrown if the user does not have this provider linked or when the provider ID given does not exist.

    Parameters

    Returns Promise<User>

    updateEmail

    updatePassword

    updatePhoneNumber

    updateProfile

    verifyBeforeUpdateEmail