@umituz/react-native-auth 4.2.6 → 4.2.7

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.2.6",
3
+ "version": "4.2.7",
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",
package/src/index.ts CHANGED
@@ -62,7 +62,7 @@ export type { UseAppleAuthResult } from './presentation/hooks/useAppleAuth';
62
62
  export { useAuthBottomSheet } from './presentation/hooks/useAuthBottomSheet';
63
63
  export type { SocialAuthConfiguration } from './presentation/hooks/useAuthBottomSheet';
64
64
  export { useAuthHandlers } from './presentation/hooks/useAuthHandlers';
65
- export type { AuthHandlersAppInfo, AuthHandlersTranslations, AuthHandlersOptions } from './presentation/hooks/useAuthHandlers';
65
+ export type { AuthHandlersAppInfo, AuthHandlersTranslations } from './presentation/hooks/useAuthHandlers';
66
66
  export { usePasswordPromptNavigation } from './presentation/hooks/usePasswordPromptNavigation';
67
67
  export type { UsePasswordPromptNavigationOptions, UsePasswordPromptNavigationReturn } from './presentation/hooks/usePasswordPromptNavigation';
68
68
 
@@ -31,18 +31,7 @@ export interface AuthHandlersTranslations {
31
31
  deleteAccountError?: string;
32
32
  }
33
33
 
34
- export interface AuthHandlersOptions {
35
- onClose?: () => void;
36
- }
37
-
38
- /**
39
- * Hook that provides authentication-related handlers
40
- */
41
- export const useAuthHandlers = (
42
- appInfo: AuthHandlersAppInfo,
43
- translations?: AuthHandlersTranslations,
44
- options?: AuthHandlersOptions
45
- ) => {
34
+ export const useAuthHandlers = (appInfo: AuthHandlersAppInfo, translations?: AuthHandlersTranslations) => {
46
35
  const { signOut } = useAuth();
47
36
  const { showAuthModal } = useAuthModalStore();
48
37
 
@@ -101,14 +90,6 @@ export const useAuthHandlers = (
101
90
  console.log("[useAuthHandlers] handleDeleteAccount called");
102
91
  }
103
92
  try {
104
- if (options?.onClose) {
105
- if (typeof __DEV__ !== "undefined" && __DEV__) {
106
- console.log("[useAuthHandlers] Closing modal before delete...");
107
- }
108
- options.onClose();
109
- await new Promise(resolve => setTimeout(resolve, 300));
110
- }
111
-
112
93
  if (typeof __DEV__ !== "undefined" && __DEV__) {
113
94
  console.log("[useAuthHandlers] Calling deleteAccountFromAuth...");
114
95
  }
@@ -126,7 +107,7 @@ export const useAuthHandlers = (
126
107
  errorMessage || translations?.deleteAccountError || "Failed to delete account"
127
108
  );
128
109
  }
129
- }, [deleteAccountFromAuth, translations, options]);
110
+ }, [deleteAccountFromAuth, translations]);
130
111
 
131
112
  const handleSignIn = useCallback(() => {
132
113
  showAuthModal(undefined, "login");