@umituz/react-native-auth 3.4.51 → 3.4.52

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.51",
3
+ "version": "3.4.52",
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",
@@ -52,9 +52,22 @@ export function useAuthBottomSheet(params: UseAuthBottomSheetParams = {}) {
52
52
 
53
53
  // Handle visibility sync with modalRef
54
54
  useEffect(() => {
55
+ if (__DEV__) {
56
+ console.log('[useAuthBottomSheet] Visibility changed:', {
57
+ isVisible,
58
+ hasModalRef: !!modalRef.current,
59
+ modalRefMethods: modalRef.current ? Object.keys(modalRef.current) : [],
60
+ });
61
+ }
55
62
  if (isVisible) {
63
+ if (__DEV__) {
64
+ console.log('[useAuthBottomSheet] Calling present()');
65
+ }
56
66
  modalRef.current?.present();
57
67
  } else {
68
+ if (__DEV__) {
69
+ console.log('[useAuthBottomSheet] Calling dismiss()');
70
+ }
58
71
  modalRef.current?.dismiss();
59
72
  }
60
73
  }, [isVisible]);
@@ -77,9 +90,21 @@ export function useAuthBottomSheet(params: UseAuthBottomSheetParams = {}) {
77
90
  const justAuthenticated = !prevIsAuthenticatedRef.current && isAuthenticated;
78
91
  const justConvertedFromAnonymous = prevIsAnonymousRef.current && !isAnonymous && isAuthenticated;
79
92
 
93
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
94
+ console.log("[useAuthBottomSheet] Auth state effect:", {
95
+ isAuthenticated,
96
+ isAnonymous,
97
+ isVisible,
98
+ prevIsAuthenticated: prevIsAuthenticatedRef.current,
99
+ prevIsAnonymous: prevIsAnonymousRef.current,
100
+ justAuthenticated,
101
+ justConvertedFromAnonymous,
102
+ willClose: (justAuthenticated || justConvertedFromAnonymous) && isVisible && !isAnonymous,
103
+ });
104
+ }
105
+
80
106
  if ((justAuthenticated || justConvertedFromAnonymous) && isVisible && !isAnonymous) {
81
107
  if (typeof __DEV__ !== "undefined" && __DEV__) {
82
- // eslint-disable-next-line no-console
83
108
  console.log("[useAuthBottomSheet] Auto-closing due to successful authentication transition", {
84
109
  justAuthenticated,
85
110
  justConvertedFromAnonymous,
@@ -53,6 +53,13 @@ export const useAuthModalStore = createStore<AuthModalState, AuthModalActions>({
53
53
  callback?: () => void | Promise<void>,
54
54
  mode: AuthModalMode = "login",
55
55
  ) => {
56
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
57
+ console.log("[authModalStore] showAuthModal called:", {
58
+ mode,
59
+ hasCallback: !!callback,
60
+ currentVisible: get().isVisible,
61
+ });
62
+ }
56
63
  set({
57
64
  isVisible: true,
58
65
  mode,