@umituz/react-native-auth 2.5.6 → 2.5.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": "2.5.6",
3
+ "version": "2.5.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",
@@ -12,7 +12,8 @@ import { AccountActions, type AccountActionsConfig } from "../components/Account
12
12
 
13
13
  export interface AccountScreenConfig {
14
14
  profile: ProfileSectionConfig;
15
- accountActions: AccountActionsConfig;
15
+ accountActions?: AccountActionsConfig;
16
+ isAnonymous: boolean;
16
17
  }
17
18
 
18
19
  export interface AccountScreenProps {
@@ -27,9 +28,17 @@ export const AccountScreen: React.FC<AccountScreenProps> = ({ config }) => {
27
28
  style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}
28
29
  contentContainerStyle={styles.content}
29
30
  >
30
- <ProfileSection profile={config.profile} />
31
- <View style={styles.divider} />
32
- <AccountActions config={config.accountActions} />
31
+ <ProfileSection
32
+ profile={config.profile}
33
+ onSignIn={config.profile.isAnonymous ? config.accountActions?.onLogout : undefined}
34
+ />
35
+
36
+ {!config.isAnonymous && config.accountActions && (
37
+ <>
38
+ <View style={styles.divider} />
39
+ <AccountActions config={config.accountActions} />
40
+ </>
41
+ )}
33
42
  </ScrollView>
34
43
  );
35
44
  };