Password breach check

This commit is contained in:
Joel Biddle
2023-08-22 16:49:17 +10:00
parent fbeb210965
commit 0eb21919fb
6 changed files with 73 additions and 9 deletions
@@ -25,6 +25,7 @@ type Errors = {
number?: string,
specialChar?: string,
repeatedChar?: string,
breachedPassword?: string
};
const schema = yup.object({
@@ -53,8 +54,8 @@ export const ChangePasswordSection = () => {
try {
if (!user?.email) return;
if (!commonPasswords) return;
const errorCheck = checkPassword({
const errorCheck = await checkPassword({
password: newPassword,
commonPasswords,
setErrors