@umituz/react-native-auth 4.2.3 → 4.2.4

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.3",
3
+ "version": "4.2.4",
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",
@@ -7,6 +7,8 @@
7
7
  import { useCallback, useRef, useEffect } from 'react';
8
8
  import { AppNavigation } from '@umituz/react-native-design-system';
9
9
 
10
+ declare const __DEV__: boolean;
11
+
10
12
  export interface UsePasswordPromptNavigationOptions {
11
13
  title?: string;
12
14
  message?: string;
@@ -34,8 +36,15 @@ export const usePasswordPromptNavigation = (
34
36
  }, []);
35
37
 
36
38
  const showPasswordPrompt = useCallback((): Promise<string | null> => {
39
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
40
+ console.log("[showPasswordPrompt] Called");
41
+ }
42
+
37
43
  return new Promise<string | null>((resolve, reject) => {
38
44
  if (resolveRef.current) {
45
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
46
+ console.log("[showPasswordPrompt] Resolving previous promise with null");
47
+ }
39
48
  resolveRef.current(null);
40
49
  }
41
50
 
@@ -43,6 +52,9 @@ export const usePasswordPromptNavigation = (
43
52
 
44
53
  const params = {
45
54
  onComplete: (password: string | null) => {
55
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
56
+ console.log("[showPasswordPrompt] onComplete called with:", password ? "password" : "null");
57
+ }
46
58
  if (resolveRef.current) {
47
59
  resolveRef.current(password);
48
60
  resolveRef.current = null;
@@ -55,8 +67,18 @@ export const usePasswordPromptNavigation = (
55
67
  };
56
68
 
57
69
  try {
70
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
71
+ console.log("[showPasswordPrompt] Navigating to PasswordPrompt with params:", { title, message });
72
+ console.log("[showPasswordPrompt] AppNavigation:", AppNavigation);
73
+ }
58
74
  AppNavigation.navigate('PasswordPrompt', params);
75
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
76
+ console.log("[showPasswordPrompt] Navigation called successfully");
77
+ }
59
78
  } catch (error) {
79
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
80
+ console.error("[showPasswordPrompt] Navigation failed:", error);
81
+ }
60
82
  if (resolveRef.current) {
61
83
  resolveRef.current(null);
62
84
  resolveRef.current = null;