Index
Properties
Properties
code
Unique error code.
Optional credential
The firebase.auth.AuthCredential that can be used to resolve the error.
Optional email
The email of the user's account used for sign-in/linking.
message
Complete error message.
name
Optional phoneNumber
The phone number of the user's account used for sign-in/linking.
resolver
The multi-factor resolver to complete second factor sign-in.
Optional tenantId
The tenant ID being used for sign-in/linking. If you use firebase.auth.Auth.signInWithRedirect to sign in, you have to set the tenant ID on Auth instanace again as the tenant ID is not persisted after redirection.
The error thrown when the user needs to provide a second factor to sign in successfully. The error code for this error is
auth/multi-factor-auth-required
. This error provides a firebase.auth.MultiFactorResolver object, which you can use to get the second sign-in factor from the user.firebase.auth().signInWithEmailAndPassword() .then(function(result) { // User signed in. No 2nd factor challenge is needed. }) .catch(function(error) { if (error.code == 'auth/multi-factor-auth-required') { var resolver = error.resolver; var multiFactorHints = resolver.hints; } else { // Handle other errors. } }); resolver.resolveSignIn(multiFactorAssertion) .then(function(userCredential) { // User signed in. });