Try and obtain a #MultiFactorResolver instance based on an error. Returns null if no resolver object could be found.
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); }}); Copy
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); }});
Try and obtain a #MultiFactorResolver instance based on an error. Returns null if no resolver object could be found.
Example