@umituz/react-native-firebase 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-firebase",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Unified Firebase package for React Native apps - Auth and Firestore services using Firebase JS SDK (no native modules).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -42,6 +42,13 @@ export async function deleteCurrentUser(
42
42
  };
43
43
  }
44
44
 
45
+ const provider = getUserAuthProvider(user);
46
+
47
+ if (provider === "password" && options.autoReauthenticate && options.onPasswordRequired) {
48
+ const reauth = await attemptReauth(user, options);
49
+ if (reauth) return reauth;
50
+ }
51
+
45
52
  try {
46
53
  await deleteUser(user);
47
54
  return successResult();
@@ -50,7 +57,6 @@ export async function deleteCurrentUser(
50
57
  const code = authErr?.code ?? "auth/failed";
51
58
  const message = authErr?.message ?? "Account deletion failed";
52
59
 
53
- // Determine if we should attempt reauthentication
54
60
  const hasCredentials = !!(options.password || options.googleIdToken);
55
61
  const shouldReauth = options.autoReauthenticate === true || hasCredentials;
56
62