@umituz/react-native-auth 3.8.0 → 3.8.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-auth",
3
- "version": "3.8.0",
3
+ "version": "3.8.2",
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",
@@ -5,14 +5,12 @@
5
5
 
6
6
  import type { IAuthRepository } from "../../application/ports/IAuthRepository";
7
7
  import type { AuthUser } from "../../domain/entities/AuthUser";
8
- import type { User } from "firebase/auth";
9
8
  import {
10
9
  signInWithEmail,
11
10
  signUpWithEmail,
12
11
  signOut as firebaseSignOut,
13
12
  getCurrentUserFromGlobal,
14
13
  setupAuthListener,
15
- type EmailCredentials,
16
14
  } from "@umituz/react-native-firebase";
17
15
  import {
18
16
  AuthValidationError,
@@ -34,11 +34,13 @@ export function useAuthBottomSheet(params: UseAuthBottomSheetParams = {}) {
34
34
  const { isAuthenticated, isAnonymous } = useAuth();
35
35
 
36
36
  // Social Auth Hooks
37
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
37
38
  const { signInWithGoogle, googleConfigured } = useGoogleAuth(socialConfig?.google);
38
39
  const { signInWithApple, appleAvailable } = useAppleAuth();
39
40
 
40
41
  // Determine enabled providers
41
42
  const providers = useMemo<SocialAuthProvider[]>(() => {
43
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
42
44
  return determineEnabledProviders(socialConfig, appleAvailable, googleConfigured);
43
45
  }, [socialConfig, appleAvailable, googleConfigured]);
44
46
 
@@ -78,9 +80,9 @@ export function useAuthBottomSheet(params: UseAuthBottomSheetParams = {}) {
78
80
  executePendingCallback();
79
81
  });
80
82
 
81
- // Cleanup timeout on unmount
82
83
  return () => clearTimeout(timeoutId);
83
84
  }
85
+ return undefined;
84
86
  }
85
87
  );
86
88
 
@@ -98,6 +100,7 @@ export function useAuthBottomSheet(params: UseAuthBottomSheetParams = {}) {
98
100
  if (onGoogleSignIn) {
99
101
  await onGoogleSignIn();
100
102
  } else if (signInWithGoogle) {
103
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
101
104
  await signInWithGoogle();
102
105
  }
103
106
  } finally {
@@ -0,0 +1,24 @@
1
+ /**
2
+ * useGoogleAuth Hook
3
+ * Handles Google Sign-In using Firebase auth
4
+ *
5
+ * This is a re-export wrapper around useGoogleOAuth from Firebase package
6
+ * for consistency with the auth package API.
7
+ */
8
+
9
+ import { useGoogleOAuth } from "@umituz/react-native-firebase";
10
+
11
+ // Re-export types from firebase
12
+ export type {
13
+ GoogleOAuthConfig as GoogleAuthConfig,
14
+ UseGoogleOAuthResult as UseGoogleAuthResult,
15
+ SocialAuthResult,
16
+ } from "@umituz/react-native-firebase";
17
+
18
+ /**
19
+ * Hook for Google authentication
20
+ * This is a direct re-export of useGoogleOAuth from firebase package
21
+ */
22
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
23
+ export const useGoogleAuth = useGoogleOAuth;
24
+
@@ -69,7 +69,7 @@ export function useFormField(
69
69
  */
70
70
  export function useFormFields<T extends Record<string, string>>(
71
71
  initialFields: T,
72
- setFieldErrors: ((errors: Partial<Record<string, string>> | ((prev: Partial<Record<string, string>>) => Partial<Record<string, string>>)) => void) | null,
72
+ _setFieldErrors: ((errors: Partial<Record<string, string>> | ((prev: Partial<Record<string, string>>) => Partial<Record<string, string>>)) => void) | null,
73
73
  options?: UseFormFieldOptions
74
74
  ) {
75
75
  type FieldKey = keyof T;