Skip to content

Commit 0937c77

Browse files
committed
fix(auth): delegate modular multiFactor to MultiFactorUser constructor
otherwise it delegates to a method that warns of deprecation, because it was deprecated in namespace API, however for modular API `multiFactor` with specific parameters is the way to create a MultiFactorUser
1 parent 2a99366 commit 0937c77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/auth/lib/modular/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { getApp } from '@react-native-firebase/app';
1919
import { fetchPasswordPolicy } from '../password-policy/passwordPolicyApi';
2020
import { PasswordPolicyImpl } from '../password-policy/PasswordPolicyImpl';
2121
import FacebookAuthProvider from '../providers/FacebookAuthProvider';
22+
import { MultiFactorUser } from '../multiFactor';
2223
export { FacebookAuthProvider };
2324

2425
/**
@@ -462,7 +463,7 @@ export async function linkWithRedirect(user, provider, resolver) {
462463
* @returns {MultiFactorUser}
463464
*/
464465
export function multiFactor(user) {
465-
return user._auth.multiFactor(user);
466+
return new MultiFactorUser(getAuth(), user);
466467
}
467468

468469
/**

0 commit comments

Comments
 (0)