@umituz/react-native-auth 3.4.14 → 3.4.15
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": "3.4.
|
|
3
|
+
"version": "3.4.15",
|
|
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",
|
|
@@ -18,6 +18,8 @@ import { collectDeviceExtras } from "@umituz/react-native-design-system";
|
|
|
18
18
|
import { initializeAuthListener } from "../../presentation/stores/initializeAuthListener";
|
|
19
19
|
import type { AuthConfig } from "../../domain/value-objects/AuthConfig";
|
|
20
20
|
|
|
21
|
+
import type { IStorageProvider } from "./AuthPackage";
|
|
22
|
+
|
|
21
23
|
/**
|
|
22
24
|
* Unified auth initialization options
|
|
23
25
|
*/
|
|
@@ -31,6 +33,9 @@ export interface InitializeAuthOptions {
|
|
|
31
33
|
/** Callback to collect device/app info for user documents */
|
|
32
34
|
collectExtras?: () => Promise<Record<string, unknown>>;
|
|
33
35
|
|
|
36
|
+
/** Storage provider for persisting auth state (e.g. anonymous mode) */
|
|
37
|
+
storageProvider?: IStorageProvider;
|
|
38
|
+
|
|
34
39
|
/** Enable auto anonymous sign-in (default: true) */
|
|
35
40
|
autoAnonymousSignIn?: boolean;
|
|
36
41
|
|
|
@@ -91,6 +96,7 @@ export async function initializeAuth(
|
|
|
91
96
|
userCollection = "users",
|
|
92
97
|
extraFields,
|
|
93
98
|
collectExtras,
|
|
99
|
+
storageProvider,
|
|
94
100
|
autoAnonymousSignIn = true,
|
|
95
101
|
onUserConverted,
|
|
96
102
|
onAuthStateChange,
|
|
@@ -115,7 +121,7 @@ export async function initializeAuth(
|
|
|
115
121
|
|
|
116
122
|
// 3. Initialize AuthService (for email/password auth)
|
|
117
123
|
try {
|
|
118
|
-
await initializeAuthService(auth, authConfig);
|
|
124
|
+
await initializeAuthService(auth, authConfig, storageProvider);
|
|
119
125
|
} catch {
|
|
120
126
|
// AuthService initialization failed, but we can continue
|
|
121
127
|
// Email/password auth won't work, but social/anonymous will
|