@umituz/react-native-auth 3.4.13 → 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.13",
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",
@@ -32,7 +32,6 @@
32
32
  "url": "git+https://github.com/umituz/react-native-auth.git"
33
33
  },
34
34
  "dependencies": {
35
- "@umituz/react-native-design-system": "latest",
36
35
  "@umituz/react-native-firebase": "latest",
37
36
  "@umituz/react-native-localization": "latest",
38
37
  "@umituz/react-native-storage": "latest",
@@ -69,7 +68,7 @@
69
68
  "@types/react": "~19.1.0",
70
69
  "@typescript-eslint/eslint-plugin": "^7.0.0",
71
70
  "@typescript-eslint/parser": "^7.0.0",
72
- "@umituz/react-native-design-system": "latest",
71
+ "@umituz/react-native-design-system": "^2.6.33",
73
72
  "@umituz/react-native-design-system-theme": "latest",
74
73
  "@umituz/react-native-firebase": "latest",
75
74
  "@umituz/react-native-haptics": "latest",
@@ -14,9 +14,12 @@ import { getFirebaseAuth } from "@umituz/react-native-firebase";
14
14
  import { initializeAuthService } from "./AuthService";
15
15
  import { configureUserDocumentService, ensureUserDocument } from "./UserDocumentService";
16
16
  import type { UserDocumentConfig } from "./UserDocumentService";
17
+ import { collectDeviceExtras } from "@umituz/react-native-design-system";
17
18
  import { initializeAuthListener } from "../../presentation/stores/initializeAuthListener";
18
19
  import type { AuthConfig } from "../../domain/value-objects/AuthConfig";
19
20
 
21
+ import type { IStorageProvider } from "./AuthPackage";
22
+
20
23
  /**
21
24
  * Unified auth initialization options
22
25
  */
@@ -30,6 +33,9 @@ export interface InitializeAuthOptions {
30
33
  /** Callback to collect device/app info for user documents */
31
34
  collectExtras?: () => Promise<Record<string, unknown>>;
32
35
 
36
+ /** Storage provider for persisting auth state (e.g. anonymous mode) */
37
+ storageProvider?: IStorageProvider;
38
+
33
39
  /** Enable auto anonymous sign-in (default: true) */
34
40
  autoAnonymousSignIn?: boolean;
35
41
 
@@ -90,6 +96,7 @@ export async function initializeAuth(
90
96
  userCollection = "users",
91
97
  extraFields,
92
98
  collectExtras,
99
+ storageProvider,
93
100
  autoAnonymousSignIn = true,
94
101
  onUserConverted,
95
102
  onAuthStateChange,
@@ -101,7 +108,8 @@ export async function initializeAuth(
101
108
  collectionName: userCollection,
102
109
  };
103
110
  if (extraFields) userDocConfig.extraFields = extraFields;
104
- if (collectExtras) userDocConfig.collectExtras = collectExtras;
111
+ // Use provided collectExtras or default to design system's implementation
112
+ userDocConfig.collectExtras = collectExtras || collectDeviceExtras;
105
113
 
106
114
  configureUserDocumentService(userDocConfig);
107
115
 
@@ -113,7 +121,7 @@ export async function initializeAuth(
113
121
 
114
122
  // 3. Initialize AuthService (for email/password auth)
115
123
  try {
116
- await initializeAuthService(auth, authConfig);
124
+ await initializeAuthService(auth, authConfig, storageProvider);
117
125
  } catch {
118
126
  // AuthService initialization failed, but we can continue
119
127
  // Email/password auth won't work, but social/anonymous will
@@ -20,7 +20,7 @@ export const AuthFormCard: React.FC<AuthFormCardProps> = ({ children }) => {
20
20
  styles.formCard,
21
21
  {
22
22
  backgroundColor: tokens.colors.surface,
23
- borderRadius: tokens.radius.xl,
23
+ borderRadius: tokens.borders.radius.xl,
24
24
  padding: tokens.spacing.lg,
25
25
  },
26
26
  ]}