Skip to content

Commit

Permalink
Update password-management.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnvdl committed Apr 26, 2024
1 parent 97e6ab5 commit 1b028f7
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,19 @@ if (passwordHashNeedsToBeRefreshed(user.password)) {
npm install @foal/password
```

To prevent users from using very weak passwords such as `123456` or `password`, you can call the `isCommon` function. This utility checks if the given password is part of the 10000 most common passwords listed [here](https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10-million-password-list-top-10000.txt).
To prevent users from using very weak passwords such as `123456` or `password`, you can call the `isCommon` function. This utility checks if the given password is part of the most common passwords listed [here](https://github.com/danielmiessler/SecLists/tree/master/Passwords/Common-Credentials).

Example 1: Check if the given password is part of the `10,000 most common passwords list`.
```typescript
const isPasswordTooCommon = await isCommon(password);
```
```

Example 2: Check if the given password is part of the `10,000 most common passwords list`.
```typescript
const isPasswordTooCommon = await isCommon(password, 'TenMillionListTop10k');
```

Example 3: Check if the given password is part of the `100,000 most common passwords list`.
```typescript
const isPasswordTooCommon = await isCommon(password, 'TenMillionListTop100k');
```

0 comments on commit 1b028f7

Please sign in to comment.