-
+
CodeLens
diff --git a/frontend/public/favicon.png b/frontend/public/favicon.png
new file mode 100644
index 0000000..573b665
Binary files /dev/null and b/frontend/public/favicon.png differ
diff --git a/frontend/public/favicon.svg b/frontend/public/favicon.svg
deleted file mode 100644
index 6893eb1..0000000
--- a/frontend/public/favicon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/frontend/public/varaint3 transparant logo.png b/frontend/public/varaint3 transparant logo.png
new file mode 100644
index 0000000..f2a0016
Binary files /dev/null and b/frontend/public/varaint3 transparant logo.png differ
diff --git a/frontend/src/components/auth/ForgotPassword.jsx b/frontend/src/components/auth/ForgotPassword.jsx
index 26364fe..6536314 100644
--- a/frontend/src/components/auth/ForgotPassword.jsx
+++ b/frontend/src/components/auth/ForgotPassword.jsx
@@ -1,6 +1,10 @@
import { useState, useEffect } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import * as authService from '../../services/authService';
+import {
+ validatePassword,
+ validateOtp,
+} from "../../utils/passwordPolicy";
export default function ForgotPassword() {
const [step, setStep] = useState(1);
@@ -15,8 +19,10 @@ export default function ForgotPassword() {
const navigate = useNavigate();
- const isPasswordValid = newPassword.length >= 6;
- const isOtpValid = otp.trim().length === 6;
+ const { checks: passwordChecks, isValid: isPasswordValid } =
+ validatePassword(newPassword);
+
+ const isOtpValid = validateOtp(otp);
const doPasswordsMatch =
confirmPassword.length > 0 && newPassword === confirmPassword;
@@ -80,7 +86,9 @@ export default function ForgotPassword() {
}
if (!isPasswordValid) {
- setError("Password must be at least 6 characters");
+ setError(
+ "Password must be at least 8 characters long and include an uppercase letter, lowercase letter, number, and special character."
+ );
return;
}
@@ -120,9 +128,19 @@ export default function ForgotPassword() {
return (
-
- RESET PASSWORD
-
+
+ {/* CodeLens Logo */}
+
+
+
+
+
+ RESET PASSWORD
+
{error && (
@@ -253,7 +271,7 @@ export default function ForgotPassword() {
0 && !isPasswordValid}
value={newPassword}
id="new-password"
@@ -268,12 +286,35 @@ export default function ForgotPassword() {
role="alert"
className="text-xs font-black uppercase tracking-widest text-red-600"
>
- Password must be at least 6 characters
+ Password must be at least 8 characters and contain uppercase,
+ lowercase, number, and special character
)}