@umituz/react-native-auth 3.5.5 → 3.5.6
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.5.
|
|
3
|
+
"version": "3.5.6",
|
|
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",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/react": "~19.1.0",
|
|
62
62
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
63
63
|
"@typescript-eslint/parser": "^7.0.0",
|
|
64
|
-
"@umituz/react-native-design-system": "^2.8.
|
|
64
|
+
"@umituz/react-native-design-system": "^2.8.36",
|
|
65
65
|
"@umituz/react-native-design-system-theme": "*",
|
|
66
66
|
"eslint": "^8.57.0",
|
|
67
67
|
"expo-apple-authentication": "^6.0.0",
|
|
@@ -63,6 +63,7 @@ export const LoginForm: React.FC<LoginFormProps> = ({ onNavigateToRegister }) =>
|
|
|
63
63
|
returnKeyType="next"
|
|
64
64
|
onSubmitEditing={() => passwordRef.current?.focus()}
|
|
65
65
|
blurOnSubmit={false}
|
|
66
|
+
textContentType="emailAddress"
|
|
66
67
|
/>
|
|
67
68
|
</View>
|
|
68
69
|
|
|
@@ -81,6 +82,7 @@ export const LoginForm: React.FC<LoginFormProps> = ({ onNavigateToRegister }) =>
|
|
|
81
82
|
helperText={passwordError || undefined}
|
|
82
83
|
returnKeyType="done"
|
|
83
84
|
onSubmitEditing={() => { void handleSignIn(); }}
|
|
85
|
+
textContentType="password"
|
|
84
86
|
/>
|
|
85
87
|
</View>
|
|
86
88
|
|
|
@@ -86,6 +86,7 @@ export const RegisterForm: React.FC<RegisterFormProps> = ({
|
|
|
86
86
|
returnKeyType="next"
|
|
87
87
|
onSubmitEditing={() => passwordRef.current?.focus()}
|
|
88
88
|
blurOnSubmit={false}
|
|
89
|
+
textContentType="emailAddress"
|
|
89
90
|
/>
|
|
90
91
|
</View>
|
|
91
92
|
|
|
@@ -105,6 +106,7 @@ export const RegisterForm: React.FC<RegisterFormProps> = ({
|
|
|
105
106
|
returnKeyType="next"
|
|
106
107
|
onSubmitEditing={() => confirmPasswordRef.current?.focus()}
|
|
107
108
|
blurOnSubmit={false}
|
|
109
|
+
textContentType="newPassword"
|
|
108
110
|
/>
|
|
109
111
|
{password.length > 0 && (
|
|
110
112
|
<PasswordStrengthIndicator requirements={passwordRequirements} />
|
|
@@ -128,6 +130,7 @@ export const RegisterForm: React.FC<RegisterFormProps> = ({
|
|
|
128
130
|
helperText={fieldErrors.confirmPassword || undefined}
|
|
129
131
|
returnKeyType="done"
|
|
130
132
|
onSubmitEditing={() => { void handleSignUp(); }}
|
|
133
|
+
textContentType="newPassword"
|
|
131
134
|
/>
|
|
132
135
|
{confirmPassword.length > 0 && (
|
|
133
136
|
<PasswordMatchIndicator isMatch={passwordsMatch} />
|
|
@@ -8,6 +8,7 @@ import { useLocalization } from "@umituz/react-native-localization";
|
|
|
8
8
|
import { useAuth } from "./useAuth";
|
|
9
9
|
import { getAuthErrorLocalizationKey } from "../utils/getAuthErrorMessage";
|
|
10
10
|
import { validateEmail, validatePasswordForLogin } from "../../infrastructure/utils/AuthValidation";
|
|
11
|
+
import { AlertService, alertService } from "@umituz/react-native-design-system";
|
|
11
12
|
|
|
12
13
|
export interface UseLoginFormResult {
|
|
13
14
|
email: string;
|
|
@@ -74,6 +75,11 @@ export function useLoginForm(): UseLoginFormResult {
|
|
|
74
75
|
|
|
75
76
|
try {
|
|
76
77
|
await signIn(email.trim(), password);
|
|
78
|
+
|
|
79
|
+
alertService.success(
|
|
80
|
+
t("auth.successTitle"),
|
|
81
|
+
t("auth.signInSuccess")
|
|
82
|
+
);
|
|
77
83
|
} catch (err: unknown) {
|
|
78
84
|
const localizationKey = getAuthErrorLocalizationKey(err);
|
|
79
85
|
const errorMessage = t(localizationKey);
|
|
@@ -14,6 +14,7 @@ import { DEFAULT_PASSWORD_CONFIG } from "../../domain/value-objects/AuthConfig";
|
|
|
14
14
|
import { useAuth } from "./useAuth";
|
|
15
15
|
import { getAuthErrorLocalizationKey } from "../utils/getAuthErrorMessage";
|
|
16
16
|
import type { PasswordRequirements } from "../../infrastructure/utils/AuthValidation";
|
|
17
|
+
import { AlertService, alertService } from "@umituz/react-native-design-system";
|
|
17
18
|
|
|
18
19
|
export interface UseRegisterFormResult {
|
|
19
20
|
displayName: string;
|
|
@@ -154,6 +155,11 @@ export function useRegisterForm(): UseRegisterFormResult {
|
|
|
154
155
|
password,
|
|
155
156
|
displayName.trim() || undefined,
|
|
156
157
|
);
|
|
158
|
+
|
|
159
|
+
alertService.success(
|
|
160
|
+
t("auth.successTitle"),
|
|
161
|
+
t("auth.signUpSuccess")
|
|
162
|
+
);
|
|
157
163
|
} catch (err: unknown) {
|
|
158
164
|
const localizationKey = getAuthErrorLocalizationKey(err);
|
|
159
165
|
const errorMessage = t(localizationKey);
|