Jump to top

getMultiFactorResolver

alias

Try and obtain a #MultiFactorResolver instance based on an error. Returns null if no resolver object could be found.

Example
const auth = firebase.auth();
auth.signInWithEmailAndPassword(email, password).then((user) => {
  // signed in
}).catch((error) => {
  if (error.code === 'auth/multi-factor-auth-required') {
    const resolver = getMultiFactorResolver(auth, error);
  }
});

Type

(auth: Module, error: unknown) => MultiFactorResolver | null