@umituz/react-native-firebase 2.4.61 → 2.4.63

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.61",
3
+ "version": "2.4.63",
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",
@@ -69,7 +69,7 @@
69
69
  "@types/react": "~19.1.10",
70
70
  "@typescript-eslint/eslint-plugin": "^8.52.0",
71
71
  "@typescript-eslint/parser": "^8.52.0",
72
- "@umituz/react-native-design-system": "^4.25.34",
72
+ "@umituz/react-native-design-system": "*",
73
73
  "eslint": "^9.39.2",
74
74
  "eslint-plugin-react": "^7.37.5",
75
75
  "eslint-plugin-react-native": "^5.0.0",
@@ -26,5 +26,3 @@ export interface GoogleAuthErrorResult {
26
26
 
27
27
  export type GoogleAuthResult = GoogleAuthSuccessResult | GoogleAuthErrorResult;
28
28
 
29
- export const PLACEHOLDER_CLIENT_ID = "000000000000-placeholder.apps.googleusercontent.com";
30
-
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import type { Auth } from "firebase/auth";
8
- import { PLACEHOLDER_CLIENT_ID, type GoogleAuthResult } from "./google-auth.types";
8
+ import type { GoogleAuthResult } from "./google-auth.types";
9
9
  import { googleAuthService } from "./google-auth.service";
10
10
 
11
11
  // Conditional import - expo-web-browser is optional
@@ -34,11 +34,7 @@ export interface GoogleOAuthConfig {
34
34
 
35
35
  function validateGoogleConfig(config?: GoogleOAuthConfig): boolean {
36
36
  if (!config) return false;
37
- return !!(
38
- (config.iosClientId && config.iosClientId !== PLACEHOLDER_CLIENT_ID) ||
39
- (config.webClientId && config.webClientId !== PLACEHOLDER_CLIENT_ID) ||
40
- (config.androidClientId && config.androidClientId !== PLACEHOLDER_CLIENT_ID)
41
- );
37
+ return !!(config.iosClientId || config.webClientId || config.androidClientId);
42
38
  }
43
39
 
44
40
  /**
@@ -8,8 +8,6 @@ import { useState, useCallback, useEffect, useRef } from "react";
8
8
  import { googleOAuthService } from "../../infrastructure/services/google-oauth.service";
9
9
  import { getFirebaseAuth } from "../../infrastructure/config/FirebaseAuthClient";
10
10
  import type { GoogleOAuthConfig } from "../../infrastructure/services/google-oauth.service";
11
- import { PLACEHOLDER_CLIENT_ID } from "../../infrastructure/services/google-auth.types";
12
-
13
11
  // Conditional import for expo-auth-session
14
12
  interface AuthSessionResponse {
15
13
  type: string;
@@ -66,11 +64,12 @@ export function useGoogleOAuth(config?: GoogleOAuthConfig): UseGoogleOAuthResult
66
64
 
67
65
  // Call the Hook directly (only valid in React component)
68
66
  // If expo-auth-session is not available, these will be null
67
+ // Empty strings are passed when config is missing to preserve hook call order (Rules of Hooks)
69
68
  const [request, response, promptAsync] = isExpoAuthAvailable && ExpoAuthSession
70
69
  ? ExpoAuthSession.useAuthRequest({
71
- iosClientId: config?.iosClientId || PLACEHOLDER_CLIENT_ID,
72
- webClientId: config?.webClientId || PLACEHOLDER_CLIENT_ID,
73
- androidClientId: config?.androidClientId || PLACEHOLDER_CLIENT_ID,
70
+ iosClientId: config?.iosClientId ?? "",
71
+ webClientId: config?.webClientId ?? "",
72
+ androidClientId: config?.androidClientId ?? "",
74
73
  })
75
74
  : [null, null, null];
76
75