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.
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.
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.
The user's unique ID.
Deletes and signs out the user.
Important: this is a security-sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call firebase.User.reauthenticateWithCredential.
Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.
Returns the current token if it has not expired. Otherwise, this will refresh the token and return a new one.
Force refresh regardless of token expiration.
Links the user account with the given credentials and returns any available additional user information, such as user name.
error.email, error.phoneNumber, and
error.credential (firebase.auth.AuthCredential)
may be provided, depending on the type of credential. You can recover
from this error by signing in with error.credential directly
via firebase.auth.Auth.signInWithCredential.error.email and error.credential
(firebase.auth.AuthCredential) fields are also provided.
You have to link the credential to the existing user with that email if
you wish to continue signing in with that credential. To do so, call
firebase.auth.Auth.fetchSignInMethodsForEmail, sign in to
error.email via one of the providers returned and then
firebase.User.linkWithCredential the original credential to that
newly signed in user.The auth credential.
Links the user account with the given credentials.
error.email, error.phoneNumber, and
error.credential (firebase.auth.AuthCredential)
may be provided, depending on the type of credential. You can recover
from this error by signing in with error.credential directly
via firebase.auth.Auth.signInWithCredential.error.email and error.credential
(firebase.auth.AuthCredential) fields are also provided.
You have to link the credential to the existing user with that email if
you wish to continue signing in with that credential. To do so, call
firebase.auth.Auth.fetchSignInMethodsForEmail, sign in to
error.email via one of the providers returned and then
firebase.User.linkWithCredential the original credential to that
newly signed in user.The auth credential.
Links the user account with the given phone number.
error.phoneNumber and
error.credential (firebase.auth.AuthCredential)
are provided in this case. You can recover from this error by signing in
with that credential directly via
firebase.auth.Auth.signInWithCredential.The user's phone number in E.164 format (e.g. +16505550101).
Links the authenticated provider to the user account using a full-page redirect flow.
The provider to authenticate. The provider has to be an OAuth provider. Non-OAuth providers like firebase.auth.EmailAuthProvider will throw an error.
Re-authenticates a user using a fresh credential, and returns any available additional user information, such as user name. Use before operations such as firebase.User.updatePassword that require tokens from recent sign-in attempts.
Re-authenticates a user using a fresh credential. Use before operations such as firebase.User.updatePassword that require tokens from recent sign-in attempts.
Re-authenticates a user using a fresh credential. Use before operations such as firebase.User.updatePassword that require tokens from recent sign-in attempts.
The user's phone number in E.164 format (e.g. +16505550101).
Refreshes the current user, if signed in.
Sends a verification email to a user.
The verification process is completed by calling firebase.auth.Auth.applyActionCode
The action code settings. If specified, the state/continue URL will be set as the "continueUrl" parameter in the email verification link. The default email verification landing page will use this to display a link to go back to the app if it is installed. If the actionCodeSettings is not specified, no URL is appended to the action URL. The state URL provided must belong to a domain that is whitelisted by the developer in the console. Otherwise an error will be thrown. Mobile app redirects will only be applicable if the developer configures and accepts the Firebase Dynamic Links terms of condition. The Android package name and iOS bundle ID will be respected only if they are configured in the same Firebase Auth project used.
Returns a JSON-serializable representation of this object.
A JSON-serializable representation of this object.
Unlinks a provider from a user account.
Updates the user's email address.
An email will be sent to the original email address (if it was set) that allows to revoke the email address change, in order to protect them from account hijacking.
Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call firebase.User.reauthenticateWithCredential.
The new email address.
Updates the user's password.
Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call firebase.User.reauthenticateWithCredential.
Updates the user's phone number.
Updates a user's profile data.
The profile's displayName and photoURL to update.
Sends a verification email to a new email address. The user's email will be updated to the new one after being verified.
If you have a custom email action handler, you can complete the verification process by calling firebase.auth.Auth.applyActionCode.
The email address to be verified and updated to.
The action code settings. If specified, the state/continue URL will be set as the "continueUrl" parameter in the email verification link. The default email verification landing page will use this to display a link to go back to the app if it is installed. If the actionCodeSettings is not specified, no URL is appended to the action URL. The state URL provided must belong to a domain that is whitelisted by the developer in the console. Otherwise an error will be thrown. Mobile app redirects will only be applicable if the developer configures and accepts the Firebase Dynamic Links terms of condition. The Android package name and iOS bundle ID will be respected only if they are configured in the same Firebase Auth project used.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.
A user account.