@react-native-firebase/auth
Version:
React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.
20 lines (17 loc) • 482 B
JavaScript
import MultiFactorResolver from './MultiFactorResolver.js';
/**
* Create a new resolver based on an auth instance and error
* object.
*
* Returns null if no resolver object can be found on the error.
*/
export function getMultiFactorResolver(auth, error) {
if (
error.hasOwnProperty('userInfo') &&
error.userInfo.hasOwnProperty('resolver') &&
error.userInfo.resolver
) {
return new MultiFactorResolver(auth, error.userInfo.resolver);
}
return null;
}