@umituz/react-native-auth 3.1.1 → 3.1.3

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.1.1",
3
+ "version": "3.1.3",
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",
@@ -15,6 +15,8 @@ export interface AccountActionsConfig {
15
15
  logoutConfirmMessage: string;
16
16
  deleteConfirmTitle: string;
17
17
  deleteConfirmMessage: string;
18
+ deleteErrorTitle?: string;
19
+ deleteErrorMessage?: string;
18
20
  onLogout: () => Promise<void>;
19
21
  onDeleteAccount: () => Promise<void>;
20
22
  }
@@ -32,6 +34,8 @@ export const AccountActions: React.FC<AccountActionsProps> = ({ config }) => {
32
34
  logoutConfirmMessage,
33
35
  deleteConfirmTitle,
34
36
  deleteConfirmMessage,
37
+ deleteErrorTitle = "Error",
38
+ deleteErrorMessage = "Failed to delete account. Please try again.",
35
39
  onLogout,
36
40
  onDeleteAccount,
37
41
  } = config;
@@ -66,7 +70,7 @@ export const AccountActions: React.FC<AccountActionsProps> = ({ config }) => {
66
70
  try {
67
71
  await onDeleteAccount();
68
72
  } catch (error) {
69
- // Silent error handling
73
+ Alert.alert(deleteErrorTitle, deleteErrorMessage);
70
74
  }
71
75
  })();
72
76
  },
@@ -82,11 +86,11 @@ export const AccountActions: React.FC<AccountActionsProps> = ({ config }) => {
82
86
  onPress={handleLogout}
83
87
  activeOpacity={0.7}
84
88
  >
85
- <AtomicIcon name="logout" size="md" color="error" />
89
+ <AtomicIcon name="log-out-outline" size="md" color="error" />
86
90
  <AtomicText style={[styles.actionText, { color: tokens.colors.error }]}>
87
91
  {logoutText}
88
92
  </AtomicText>
89
- <AtomicIcon name="chevron-right" size="sm" color="secondary" />
93
+ <AtomicIcon name="chevron-forward" size="sm" color="secondary" />
90
94
  </TouchableOpacity>
91
95
 
92
96
  {/* Delete Account */}
@@ -95,11 +99,11 @@ export const AccountActions: React.FC<AccountActionsProps> = ({ config }) => {
95
99
  onPress={handleDeleteAccount}
96
100
  activeOpacity={0.7}
97
101
  >
98
- <AtomicIcon name="trash-2" size="md" color="error" />
102
+ <AtomicIcon name="trash-outline" size="md" color="error" />
99
103
  <AtomicText style={[styles.actionText, { color: tokens.colors.error }]}>
100
104
  {deleteAccountText}
101
105
  </AtomicText>
102
- <AtomicIcon name="chevron-right" size="sm" color="secondary" />
106
+ <AtomicIcon name="chevron-forward" size="sm" color="secondary" />
103
107
  </TouchableOpacity>
104
108
  </View>
105
109
  );