@umituz/react-native-auth 2.2.2 → 2.3.0

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": "2.2.2",
3
+ "version": "2.3.0",
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",
@@ -48,7 +48,14 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/react": "~19.1.0",
51
- "typescript": "~5.9.2"
51
+ "@types/node": "^20.0.0",
52
+ "typescript": "~5.9.2",
53
+ "react-native": "~0.76.0",
54
+ "firebase": "^11.0.0",
55
+ "zustand": "^4.0.0",
56
+ "@gorhom/bottom-sheet": "^5.0.0",
57
+ "react-native-reanimated": "^3.0.0",
58
+ "react-native-gesture-handler": "^2.0.0"
52
59
  },
53
60
  "publishConfig": {
54
61
  "access": "public"
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Global type declarations for React Native environment
3
+ */
4
+
5
+ declare const __DEV__: boolean;
@@ -47,6 +47,7 @@ export const AuthBottomSheet: React.FC<AuthBottomSheetProps> = ({
47
47
  onTermsPress,
48
48
  onPrivacyPress,
49
49
  }) => {
50
+ if (__DEV__) console.log("[AuthBottomSheet] Component rendering");
50
51
  const tokens = useAppDesignTokens();
51
52
  const { t } = useLocalization();
52
53
  const modalRef = useRef<BottomSheetModal>(null);
@@ -54,6 +55,7 @@ export const AuthBottomSheet: React.FC<AuthBottomSheetProps> = ({
54
55
  const { isVisible, mode, hideAuthModal, setMode, executePendingCallback, clearPendingCallback } =
55
56
  useAuthModalStore();
56
57
  const { isAuthenticated, isGuest } = useAuth();
58
+ if (__DEV__) console.log("[AuthBottomSheet] isVisible:", isVisible, "isAuthenticated:", isAuthenticated);
57
59
 
58
60
  // Present/dismiss modal based on visibility state
59
61
  useEffect(() => {
@@ -47,8 +47,10 @@ export interface UseAuthResult {
47
47
  * ```
48
48
  */
49
49
  export function useAuth(): UseAuthResult {
50
+ if (__DEV__) console.log("[useAuth] Hook called");
50
51
  const state = useAuthState();
51
52
  const actions = useAuthActions(state);
53
+ if (__DEV__) console.log("[useAuth] isAuthenticated:", state.isAuthenticated, "isGuest:", state.isGuest);
52
54
 
53
55
  return {
54
56
  user: state.user,
@@ -25,7 +25,9 @@ export interface UseAuthStateResult {
25
25
  * Hook for managing authentication state
26
26
  */
27
27
  export function useAuthState(): UseAuthStateResult {
28
+ if (__DEV__) console.log("[useAuthState] Hook called");
28
29
  const { user: firebaseUser, loading: firebaseLoading } = useFirebaseAuth();
30
+ if (__DEV__) console.log("[useAuthState] firebaseUser:", firebaseUser?.uid, "firebaseLoading:", firebaseLoading);
29
31
  const [isGuest, setIsGuest] = useState(() => {
30
32
  const service = getAuthService();
31
33
  return service ? service.getIsGuestMode() : false;