@umituz/react-native-auth 4.3.17 → 4.3.19
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-auth",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.19",
|
|
4
4
|
"description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design with dependency injection, configurable validation, and comprehensive error handling.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
signOut as firebaseSignOut,
|
|
12
12
|
getCurrentUserFromGlobal,
|
|
13
13
|
setupAuthListener,
|
|
14
|
+
ensureUserDocument,
|
|
14
15
|
} from "@umituz/react-native-firebase";
|
|
15
16
|
import {
|
|
16
17
|
AuthValidationError,
|
|
@@ -77,6 +78,10 @@ export class AuthRepository implements IAuthRepository {
|
|
|
77
78
|
if (!authUser) {
|
|
78
79
|
throw new AuthError("Failed to map user");
|
|
79
80
|
}
|
|
81
|
+
|
|
82
|
+
// Create Firestore user document for new users
|
|
83
|
+
await ensureUserDocument(result.data, { signUpMethod: "email" });
|
|
84
|
+
|
|
80
85
|
return authUser;
|
|
81
86
|
}
|
|
82
87
|
|
|
@@ -103,6 +108,10 @@ export class AuthRepository implements IAuthRepository {
|
|
|
103
108
|
if (!authUser) {
|
|
104
109
|
throw new AuthError("Failed to map user");
|
|
105
110
|
}
|
|
111
|
+
|
|
112
|
+
// Ensure Firestore user document exists for existing users too
|
|
113
|
+
await ensureUserDocument(result.data, { signUpMethod: "email" });
|
|
114
|
+
|
|
106
115
|
return authUser;
|
|
107
116
|
}
|
|
108
117
|
|