The Firebase Auth service interface.
Do not call this constructor directly. Instead, usefirebase.auth()
.
SeeFirebase Authenticationfor a full guide on how to use the Firebase Auth service.
Index
Type aliases
Properties
Variables
Methods
- apply
Action Code - check
Action Code - confirm
Password Reset - create
User With Email And Password - fetch
Sign InMethods For Email - is
Sign InWith Email Link - on
Auth State Changed - on
IdToken Changed - send
Password Reset Email - send
Sign InLink ToEmail - set
Persistence - sign
InAnd Retrieve Data With Credential - sign
InAnonymously - sign
InWith Credential - sign
InWith Custom Token - sign
InWith Email And Password - sign
InWith Email Link - sign
InWith Phone Number - sign
Out - update
Current User - use
Device Language - use
Emulator - verify
Password Reset Code
Type aliases
Persistence
Properties
app
Theapp associated with theAuth
serviceinstance.
- example
var app = auth.app;
config
The config used to initialize this instance.
currentUser
The currently signed-in user (or null).
emulatorConfig
The current emulator configuration (or null).
languageCode
The current Auth instance's language code. This is a readable/writableproperty. When set to null, the default Firebase Console language settingis applied. The language code will propagate to email action templates(password reset, email verification and email change revocation), SMStemplates for phone authentication, reCAPTCHA verifier and OAuthpopup/redirect operations provided the specified providers supportlocalization with the language code specified.
name
The name of the app associated with the Auth service instance.
settings
The current Auth instance's settings. This is used to edit/read configurationrelated options like app verification mode for phone authentication.
tenantId
The current Auth instance's tenant ID. This is a readable/writableproperty. When you set the tenant ID of an Auth instance, all futuresign-in/sign-up operations will pass this tenant ID and sign in orsign up users to the specified tenant project.When set to null, users are signed in to the parent project. By default,this is set to null.
- 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. });
Variables
Persistence
An enumeration of the possible persistence mechanism types.
Type declaration
LOCAL:Persistence
Indicates that the state will be persisted even when the browser window isclosed or the activity is destroyed in react-native.
NONE:Persistence
Indicates that the state will only be stored in memory and will be clearedwhen the window or activity is refreshed.
SESSION:Persistence
Indicates that the state will only persist in current session/tab, relevantto web only, and will be cleared when the tab is closed.
Methods
applyActionCode
- apply
Action Code(code: string):Promise<void> Applies a verification code sent to the user by email or other out-of-bandmechanism.
Error Codes
- auth/expired-action-code
- Thrown if the action code has expired.
- auth/invalid-action-code
- Thrown if the action code is invalid. This can happen if the code ismalformed or has already been used.
- auth/user-disabled
- Thrown if the user corresponding to the given action code has beendisabled.
- auth/user-not-found
- Thrown if there is no user corresponding to the action code. This mayhave happened if the user was deleted between when the action code wasissued and when this method was called.
Parameters
code:string
A verification code sent to the user.
ReturnsPromise<void>
checkActionCode
- check
Action Code(code: string):Promise<ActionCodeInfo> Checks a verification code sent to the user by email or other out-of-bandmechanism.
Returns metadata about the code.
Error Codes
- auth/expired-action-code
- Thrown if the action code has expired.
- auth/invalid-action-code
- Thrown if the action code is invalid. This can happen if the code ismalformed or has already been used.
- auth/user-disabled
- Thrown if the user corresponding to the given action code has beendisabled.
- auth/user-not-found
- Thrown if there is no user corresponding to the action code. This mayhave happened if the user was deleted between when the action code wasissued and when this method was called.
Parameters
code:string
A verification code sent to the user.
ReturnsPromise<ActionCodeInfo>
confirmPasswordReset
- confirm
Password Reset(code: string, newPassword: string):Promise<void> Completes the password reset process, given a confirmation code and newpassword.
Error Codes
- auth/expired-action-code
- Thrown if the password reset code has expired.
- auth/invalid-action-code
- Thrown if the password reset code is invalid. This can happen if thecode is malformed or has already been used.
- auth/user-disabled
- Thrown if the user corresponding to the given password reset code hasbeen disabled.
- auth/user-not-found
- Thrown if there is no user corresponding to the password reset code. Thismay have happened if the user was deleted between when the code wasissued and when this method was called.
- auth/weak-password
- Thrown if the new password is not strong enough.
Parameters
code:string
The confirmation code send via email to the user.
newPassword:string
The new password.
ReturnsPromise<void>
createUserWithEmailAndPassword
- create
User With Email And Password(email: string, password: string):Promise<UserCredential> Creates a new user account associated with the specified email address andpassword.
On successful creation of the user account, this user will also besigned in to your application.
User account creation can fail if the account already exists or the passwordis invalid.
Note: The email address acts as a unique identifier for the user andenables an email-based password reset. This function will createa new user account and set the initial user password.
Error Codes
- auth/email-already-in-use
- Thrown if there already exists an account with the given emailaddress.
- auth/invalid-email
- Thrown if the email address is not valid.
- auth/operation-not-allowed
- Thrown if email/password accounts are not enabled. Enable email/passwordaccounts in the Firebase Console, under the Auth tab.
- auth/weak-password
- Thrown if the password is not strong enough.
- example
firebase.auth().createUserWithEmailAndPassword(email, password) .catch(function(error){// Handle Errors here.var errorCode = error.code;var errorMessage = error.message;if (errorCode =='auth/weak-password') { alert('The password is too weak.'); }else { alert(errorMessage); }console.log(error);});
Parameters
email:string
The user's email address.
password:string
The user's chosen password.
ReturnsPromise<UserCredential>
fetchSignInMethodsForEmail
- fetch
Sign InMethods For Email(email: string):Promise<Array<string>> Gets the list of possible sign in methods for the given email address. Thisis useful to differentiate methods of sign-in for the same provider,eg.
EmailAuthProvider
which has 2 methods of sign-in, email/password andemail/link.Error Codes
- auth/invalid-email
- Thrown if the email address is not valid.
Parameters
email:string
ReturnsPromise<Array<string>>
isSignInWithEmailLink
- is
Sign InWith Email Link(emailLink: string):boolean Checks if an incoming link is a sign-in with email link.
Parameters
emailLink:string
Returnsboolean
onAuthStateChanged
- on
Auth State Changed(nextOrObserver: Observer<any> |((a: User |null) =>any), error?: (a: Error) =>any, completed?: firebase.Unsubscribe):firebase.Unsubscribe Adds an observer for changes to the user's sign-in state.
Prior to 4.0.0, this triggered the observer when users were signed in,signed out, or when the user's ID token changed in situations such as tokenexpiry or password change. After 4.0.0, the observer is only triggeredon sign-in or sign-out.
To keep the old behavior, seefirebase.auth.Auth.onIdTokenChanged.
- example
firebase.auth().onAuthStateChanged(function(user){if (user) {// User is signed in. }});
Parameters
nextOrObserver:Observer<any> |((a:User |null) =>any)
Optional error:(a:Error) =>any
Optional completed:firebase.Unsubscribe
Returnsfirebase.Unsubscribe
onIdTokenChanged
- on
IdToken Changed(nextOrObserver: Observer<any> |((a: User |null) =>any), error?: (a: Error) =>any, completed?: firebase.Unsubscribe):firebase.Unsubscribe Adds an observer for changes to the signed-in user's ID token, which includessign-in, sign-out, and token refresh events. This method has the samebehavior asfirebase.auth.Auth.onAuthStateChanged had prior to 4.0.0.
- example
firebase.auth().onIdTokenChanged(function(user){if (user) {// User is signed in or token was refreshed. }});
Parameters
nextOrObserver:Observer<any> |((a:User |null) =>any)
Optional error:(a:Error) =>any
Optional A functiontriggered on auth error.
Optional completed:firebase.Unsubscribe
Optional A function triggered when theobserver is removed.
Returnsfirebase.Unsubscribe
sendPasswordResetEmail
- send
Password Reset Email(email: string, actionCodeSettings?: ActionCodeSettings |null):Promise<void> Sends a password reset email to the given email address.
To complete the password reset, callfirebase.auth.Auth.confirmPasswordReset with the code supplied in theemail sent to the user, along with the new password specified by the user.
Error Codes
- auth/invalid-email
- Thrown if the email address is not valid.
- auth/missing-android-pkg-name
- An Android package name must be provided if the Android app is requiredto be installed.
- auth/missing-continue-uri
- A continue URL must be provided in the request.
- auth/missing-ios-bundle-id
- An iOS Bundle ID must be provided if an App Store ID is provided.
- auth/invalid-continue-uri
- The continue URL provided in the request is invalid.
- auth/unauthorized-continue-uri
- The domain of the continue URL is not whitelisted. Whitelistthe domain in the Firebase console.
- auth/user-not-found
- Thrown if there is no user corresponding to the email address.
- example
var actionCodeSettings = {url:'https://www.example.com/?email=user@example.com',iOS: {bundleId:'com.example.ios' },android: {packageName:'com.example.android',installApp:true,minimumVersion:'12' },handleCodeInApp:true};firebase.auth().sendPasswordResetEmail('user@example.com', actionCodeSettings) .then(function(){// Password reset email sent. }) .catch(function(error){// Error occurred. Inspect error.code. });
Parameters
email:string
The email address with the password to be reset.
Optional actionCodeSettings:ActionCodeSettings |null
The actioncode settings. If specified, the state/continue URL will be set as the"continueUrl" parameter in the password reset link. The default passwordreset landing page will use this to display a link to go back to the appif it is installed.If the actionCodeSettings is not specified, no URL is appended to theaction URL.The state URL provided must belong to a domain that is whitelisted by thedeveloper in the console. Otherwise an error will be thrown.Mobile app redirects will only be applicable if the developer configuresand accepts the Firebase Dynamic Links terms of condition.The Android package name and iOS bundle ID will be respected only if theyare configured in the same Firebase Auth project used.
ReturnsPromise<void>
sendSignInLinkToEmail
- send
Sign InLink ToEmail(email: string, actionCodeSettings: ActionCodeSettings):Promise<void> Sends a sign-in email link to the user with the specified email.
The sign-in operation has to always be completed in the app unlike other outof band email actions (password reset and email verifications). This isbecause, at the end of the flow, the user is expected to be signed in andtheir Auth state persisted within the app.
To complete sign in with the email link, callfirebase.auth.Auth.signInWithEmailLink with the email address andthe email link supplied in the email sent to the user.
Error Codes
- auth/argument-error
- Thrown if handleCodeInApp is false.
- auth/invalid-email
- Thrown if the email address is not valid.
- auth/missing-android-pkg-name
- An Android package name must be provided if the Android app is requiredto be installed.
- auth/missing-continue-uri
- A continue URL must be provided in the request.
- auth/missing-ios-bundle-id
- An iOS Bundle ID must be provided if an App Store ID is provided.
- auth/invalid-continue-uri
- The continue URL provided in the request is invalid.
- auth/unauthorized-continue-uri
- The domain of the continue URL is not whitelisted. Whitelistthe domain in the Firebase console.
- example
var actionCodeSettings = {// The URL to redirect to for sign-in completion. This is also the deep// link for mobile redirects. The domain (www.example.com) for this URL// must be whitelisted in the Firebase Console.url:'https://www.example.com/finishSignUp?cartId=1234',iOS: {bundleId:'com.example.ios' },android: {packageName:'com.example.android',installApp:true,minimumVersion:'12' },// This must be true.handleCodeInApp:true};firebase.auth().sendSignInLinkToEmail('user@example.com', actionCodeSettings) .then(function(){// The link was successfully sent. Inform the user. Save the email// locally so you don't need to ask the user for it again if they open// the link on the same device. }) .catch(function(error){// Some error occurred, you can inspect the code: error.code });
Parameters
email:string
The email account to sign in with.
actionCodeSettings:ActionCodeSettings
The actioncode settings. The action code settings which provides Firebase withinstructions on how to construct the email link. This includes thesign in completion URL or the deep link for mobile redirects, the mobileapps to use when the sign-in link is opened on an Android or iOS device.Mobile app redirects will only be applicable if the developer configuresand accepts the Firebase Dynamic Links terms of condition.The Android package name and iOS bundle ID will be respected only if theyare configured in the same Firebase Auth project used.
ReturnsPromise<void>
setPersistence
- set
Persistence(persistence: Persistence):Promise<void> Changes the current type of persistence on the current Auth instance for thecurrently saved Auth session and applies this type of persistence forfuture sign-in requests, including sign-in with redirect requests. This willreturn a promise that will resolve once the state finishes copying from onetype of storage to the other.Calling a sign-in method after changing persistence will wait for thatpersistence change to complete before applying it on the new Auth state.
This makes it easy for a user signing in to specify whether their sessionshould be remembered or not. It also makes it easier to never persist theAuth state for applications that are shared by other users or have sensitivedata.
The default for web browser apps and React Native apps is 'local' (providedthe browser supports this mechanism) whereas it is 'none' for Node.js backendapps.
Error Codes (thrown synchronously)
- auth/invalid-persistence-type
- Thrown if the specified persistence type is invalid.
- auth/unsupported-persistence-type
- Thrown if the current environment does not support the specifiedpersistence type.
- example
firebase.auth().setPersistence(firebase.auth.Auth.Persistence.SESSION) .then(function(){// Existing and future Auth states are now persisted in the current// session only. Closing the window would clear any existing state even if// a user forgets to sign out.});
Parameters
persistence:Persistence
ReturnsPromise<void>
signInAndRetrieveDataWithCredential
- sign
InAnd Retrieve Data With Credential(credential: AuthCredential):Promise<UserCredential> - deprecated
This method is deprecated. Usefirebase.auth.Auth.signInWithCredential instead.
Asynchronously signs in with the given credentials, and returns any availableadditional user information, such as user name.
Error Codes
- auth/account-exists-with-different-credential
- Thrown if there already exists an account with the email addressasserted by the credential. Resolve this by callingfirebase.auth.Auth.fetchSignInMethodsForEmail and then asking theuser to sign in using one of the returned providers. Once the user issigned in, the original credential can be linked to the user withfirebase.User.linkWithCredential.
- auth/invalid-credential
- Thrown if the credential is malformed or has expired.
- auth/operation-not-allowed
- Thrown if the type of account corresponding to the credentialis not enabled. Enable the account type in the Firebase Console, underthe Auth tab.
- auth/user-disabled
- Thrown if the user corresponding to the given credential has beendisabled.
- auth/user-not-found
- Thrown if signing in with a credential fromfirebase.auth.EmailAuthProvider.credential and there is no usercorresponding to the given email.
- auth/wrong-password
- Thrown if signing in with a credential fromfirebase.auth.EmailAuthProvider.credential and the password isinvalid for the given email, or if the account corresponding to the emaildoes not have a password set.
- auth/invalid-verification-code
- Thrown if the credential is afirebase.auth.PhoneAuthProvider.credential and the verificationcode of the credential is not valid.
- auth/invalid-verification-id
- Thrown if the credential is afirebase.auth.PhoneAuthProvider.credential and the verificationID of the credential is not valid.
- example
firebase.auth().signInAndRetrieveDataWithCredential(credential) .then(function(userCredential){console.log(userCredential.additionalUserInfo.username); });
Parameters
credential:AuthCredential
The auth credential.
ReturnsPromise<UserCredential>
signInAnonymously
- sign
InAnonymously():Promise<UserCredential> Asynchronously signs in as an anonymous user.
If there is already an anonymous user signed in, that user will be returned;otherwise, a new anonymous user identity will be created and returned.
Error Codes
- auth/operation-not-allowed
- Thrown if anonymous accounts are not enabled. Enable anonymous accountsin the Firebase Console, under the Auth tab.
- example
firebase.auth().signInAnonymously().catch(function(error){// Handle Errors here.var errorCode = error.code;var errorMessage = error.message;if (errorCode ==='auth/operation-not-allowed') { alert('You must enable Anonymous auth in the Firebase Console.'); }else {console.error(error); }});
ReturnsPromise<UserCredential>
signInWithCredential
- sign
InWith Credential(credential: AuthCredential):Promise<UserCredential> Asynchronously signs in with the given credentials.
Error Codes
- auth/account-exists-with-different-credential
- Thrown if there already exists an account with the email addressasserted by the credential. Resolve this by callingfirebase.auth.Auth.fetchSignInMethodsForEmail and then asking theuser to sign in using one of the returned providers. Once the user issigned in, the original credential can be linked to the user withfirebase.User.linkWithCredential.
- auth/invalid-credential
- Thrown if the credential is malformed or has expired.
- auth/operation-not-allowed
- Thrown if the type of account corresponding to the credentialis not enabled. Enable the account type in the Firebase Console, underthe Auth tab.
- auth/user-disabled
- Thrown if the user corresponding to the given credential has beendisabled.
- auth/user-not-found
- Thrown if signing in with a credential fromfirebase.auth.EmailAuthProvider.credential and there is no usercorresponding to the given email.
- auth/wrong-password
- Thrown if signing in with a credential fromfirebase.auth.EmailAuthProvider.credential and the password isinvalid for the given email, or if the account corresponding to the emaildoes not have a password set.
- auth/invalid-verification-code
- Thrown if the credential is afirebase.auth.PhoneAuthProvider.credential and the verificationcode of the credential is not valid.
- auth/invalid-verification-id
- Thrown if the credential is afirebase.auth.PhoneAuthProvider.credential and the verificationID of the credential is not valid.
- example
firebase.auth().signInWithCredential(credential).catch(function(error){// Handle Errors here.var errorCode = error.code;var errorMessage = error.message;// The email of the user's account used.var email = error.email;// The firebase.auth.AuthCredential type that was used.var credential = error.credential;if (errorCode ==='auth/account-exists-with-different-credential') { alert('Email already associated with another account.');// Handle account linking here, if using. }else {console.error(error); } });
Parameters
credential:AuthCredential
The auth credential.
ReturnsPromise<UserCredential>
signInWithCustomToken
- sign
InWith Custom Token(token: string):Promise<UserCredential> Asynchronously signs in using a custom token.
Custom tokens are used to integrate Firebase Auth with existing auth systems,and must be generated by the auth backend.
Fails with an error if the token is invalid, expired, or not accepted by theFirebase Auth service.
Error Codes
- auth/custom-token-mismatch
- Thrown if the custom token is for a different Firebase App.
- auth/invalid-custom-token
- Thrown if the custom token format is incorrect.
- example
firebase.auth().signInWithCustomToken(token).catch(function(error){// Handle Errors here.var errorCode = error.code;var errorMessage = error.message;if (errorCode ==='auth/invalid-custom-token') { alert('The token you provided is not valid.'); }else {console.error(error); }});
Parameters
token:string
The custom token to sign in with.
ReturnsPromise<UserCredential>
signInWithEmailAndPassword
- sign
InWith Email And Password(email: string, password: string):Promise<UserCredential> Asynchronously signs in using an email and password.
Fails with an error if the email address and password do not match.
Note: The user's password is NOT the password used to access the user's emailaccount. The email address serves as a unique identifier for the user, andthe password is used to access the user's account in your Firebase project.
See also:firebase.auth.Auth.createUserWithEmailAndPassword.
Error Codes
- auth/invalid-email
- Thrown if the email address is not valid.
- auth/user-disabled
- Thrown if the user corresponding to the given email has beendisabled.
- auth/user-not-found
- Thrown if there is no user corresponding to the given email.
- auth/wrong-password
- Thrown if the password is invalid for the given email, or the accountcorresponding to the email does not have a password set.
- example
firebase.auth().signInWithEmailAndPassword(email, password) .catch(function(error){// Handle Errors here.var errorCode = error.code;var errorMessage = error.message;if (errorCode ==='auth/wrong-password') { alert('Wrong password.'); }else { alert(errorMessage); }console.log(error);});
Parameters
email:string
The users email address.
password:string
The users password.
ReturnsPromise<UserCredential>
signInWithEmailLink
- sign
InWith Email Link(email: string, emailLink?: string):Promise<UserCredential> Asynchronously signs in using an email and sign-in email link. If no linkis passed, the link is inferred from the current URL.
Fails with an error if the email address is invalid or OTP in email linkexpires.
Note: Confirm the link is a sign-in email link before calling this methodfirebase.auth.Auth.isSignInWithEmailLink.
Error Codes
- auth/expired-action-code
- Thrown if OTP in email link expires.
- auth/invalid-email
- Thrown if the email address is not valid.
- auth/user-disabled
- Thrown if the user corresponding to the given email has beendisabled.
- example
firebase.auth().signInWithEmailLink(email, emailLink) .catch(function(error){// Some error occurred, you can inspect the code: error.code// Common errors could be invalid email and invalid or expired OTPs. });
Parameters
email:string
The email account to sign in with.
Optional emailLink:string
The optional link which contains the OTP neededto complete the sign in with email link. If not specified, the currentURL is used instead.
ReturnsPromise<UserCredential>
signInWithPhoneNumber
- sign
InWith Phone Number(phoneNumber: string, applicationVerifier: ApplicationVerifier):Promise<ConfirmationResult> Asynchronously signs in using a phone number. This method sends a code viaSMS to the given phone number, and returns afirebase.auth.ConfirmationResult. After the user provides the codesent to their phone, callfirebase.auth.ConfirmationResult.confirmwith the code to sign the user in.
For abuse prevention, this method also requires afirebase.auth.ApplicationVerifier. The Firebase Auth SDK includesa reCAPTCHA-based implementation, firebase.auth.RecaptchaVerifier.
Error Codes
- auth/captcha-check-failed
- Thrown if the reCAPTCHA response token was invalid, expired, or ifthis method was called from a non-whitelisted domain.
- auth/invalid-phone-number
- Thrown if the phone number has an invalid format.
- auth/missing-phone-number
- Thrown if the phone number is missing.
- auth/quota-exceeded
- Thrown if the SMS quota for the Firebase project has been exceeded.
- auth/user-disabled
- Thrown if the user corresponding to the given phone number has beendisabled.
- auth/operation-not-allowed
- Thrown if you have not enabled the provider in the Firebase Console. Goto the Firebase Console for your project, in the Auth section and theSign in Method tab and configure the provider.
- example
// 'recaptcha-container' is the ID of an element in the DOM.var applicationVerifier =new firebase.auth.RecaptchaVerifier('recaptcha-container');firebase.auth().signInWithPhoneNumber(phoneNumber, applicationVerifier) .then(function(confirmationResult){var verificationCode =window.prompt('Please enter the verification ' +'code that was sent to your mobile device.');return confirmationResult.confirm(verificationCode); }) .catch(function(error){// Handle Errors here. });
Parameters
phoneNumber:string
The user's phone number in E.164 format (e.g.+16505550101).
applicationVerifier:ApplicationVerifier
ReturnsPromise<ConfirmationResult>
signOut
- sign
Out():Promise<void> Signs out the current user.
ReturnsPromise<void>
updateCurrentUser
- update
Current User(user: User |null):Promise<void> Asynchronously sets the provided user as
currentUser
on the current Authinstance. A new instance copy of the user provided will be made and set ascurrentUser
.This will triggerfirebase.auth.Auth.onAuthStateChanged andfirebase.auth.Auth.onIdTokenChanged listeners like other sign inmethods.
The operation fails with an error if the user to be updated belongs to adifferent Firebase project.
Error Codes
- auth/invalid-user-token
- Thrown if the user to be updated belongs to a diffent Firebaseproject.
- auth/user-token-expired
- Thrown if the token of the user to be updated is expired.
- auth/null-user
- Thrown if the user to be updated is null.
- auth/tenant-id-mismatch
- Thrown if the provided user's tenant ID does not match theunderlying Auth instance's configured tenant ID
Parameters
user:User |null
ReturnsPromise<void>
useDeviceLanguage
- use
Device Language():void Sets the current language to the default device/browser preference.
Returnsvoid
useEmulator
- use
Emulator(url: string):void Modify this Auth instance to communicate with the Firebase Auth emulator. This must becalled synchronously immediately following the first call to
firebase.auth()
. Do not usewith production credentials as emulator traffic is not encrypted.Parameters
url:string
The URL at which the emulator is running (eg, 'http://localhost:9099')
Returnsvoid
verifyPasswordResetCode
- verify
Password Reset Code(code: string):Promise<string> Checks a password reset code sent to the user by email or other out-of-bandmechanism.
Returns the user's email address if valid.
Error Codes
- auth/expired-action-code
- Thrown if the password reset code has expired.
- auth/invalid-action-code
- Thrown if the password reset code is invalid. This can happen if the codeis malformed or has already been used.
- auth/user-disabled
- Thrown if the user corresponding to the given password reset code hasbeen disabled.
- auth/user-not-found
- Thrown if there is no user corresponding to the password reset code. Thismay have happened if the user was deleted between when the code wasissued and when this method was called.
Parameters
code:string
A verification code sent to the user.
ReturnsPromise<string>
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 2022-07-27 UTC.