@umituz/react-native-auth 1.8.0 → 1.8.1
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": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design supports Firebase Auth and can be adapted for Supabase or other providers.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import { useState, useCallback } from "react";
|
|
7
7
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
8
|
+
import { batchValidate } from "@umituz/react-native-validation";
|
|
8
9
|
import {
|
|
9
10
|
validateEmail,
|
|
10
|
-
|
|
11
|
+
validatePasswordForRegister,
|
|
11
12
|
validatePasswordConfirmation,
|
|
12
|
-
|
|
13
|
-
} from "
|
|
13
|
+
} from "../../infrastructure/utils/AuthValidation";
|
|
14
|
+
import { DEFAULT_PASSWORD_CONFIG } from "../../domain/value-objects/AuthConfig";
|
|
14
15
|
import { useAuth } from "./useAuth";
|
|
15
16
|
import { getAuthErrorLocalizationKey } from "../utils/getAuthErrorMessage";
|
|
16
17
|
|
|
@@ -116,18 +117,11 @@ export function useRegisterForm(): UseRegisterFormResult {
|
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
119
|
field: "password",
|
|
119
|
-
validator: () =>
|
|
120
|
-
validatePassword(password, {
|
|
121
|
-
minLength: 6,
|
|
122
|
-
requireUppercase: false,
|
|
123
|
-
requireLowercase: false,
|
|
124
|
-
requireNumber: false,
|
|
125
|
-
}),
|
|
120
|
+
validator: () => validatePasswordForRegister(password, DEFAULT_PASSWORD_CONFIG),
|
|
126
121
|
},
|
|
127
122
|
{
|
|
128
123
|
field: "confirmPassword",
|
|
129
|
-
validator: () =>
|
|
130
|
-
validatePasswordConfirmation(password, confirmPassword),
|
|
124
|
+
validator: () => validatePasswordConfirmation(password, confirmPassword),
|
|
131
125
|
},
|
|
132
126
|
]);
|
|
133
127
|
|