mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 01:05:40 +00:00
Add check for most common passwords
This commit is contained in:
@@ -19,7 +19,8 @@ import AddApiKeyDialog from '../../../components/basic/dialog/AddApiKeyDialog';
|
||||
import getAPIKeys from '../../api/apiKey/getAPIKeys';
|
||||
import getUser from '../../api/user/getUser';
|
||||
import {
|
||||
useRevokeAllSessions
|
||||
useRevokeAllSessions,
|
||||
useGetCommonPasswords
|
||||
} from '@app/hooks/api';
|
||||
|
||||
type Errors = {
|
||||
@@ -32,6 +33,7 @@ type Errors = {
|
||||
};
|
||||
|
||||
export default function PersonalSettings() {
|
||||
const { data: commonPasswords } = useGetCommonPasswords();
|
||||
const [personalEmail, setPersonalEmail] = useState('');
|
||||
const [personalName, setPersonalName] = useState('');
|
||||
const [currentPasswordError, setCurrentPasswordError] = useState(false);
|
||||
@@ -168,6 +170,7 @@ export default function PersonalSettings() {
|
||||
setNewPassword(password);
|
||||
checkPassword({
|
||||
password,
|
||||
commonPasswords,
|
||||
setErrors
|
||||
});
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user