UNPKG

@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.

21 lines (17 loc) 529 B
/** * Base class to facilitate multi-factor authentication. */ export default class MultiFactorResolver { constructor(auth, resolver) { this._auth = auth; this.hints = resolver.hints; this.session = resolver.session; } resolveSignIn(assertion) { const { token, secret, uid, verificationCode } = assertion; if (token && secret) { return this._auth.resolveMultiFactorSignIn(this.session, token, secret); } return this._auth.resolveTotpSignIn(this.session, uid, verificationCode); } }