Skip to content

Commit 9b889b3

Browse files
authored
Merge pull request #449 from kenjis/docs-note-strong_password
docs: add note about strong_password
2 parents a53c106 + f8f2ce1 commit 9b889b3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/concepts.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,17 @@ public $passwordValidators = [
8888
//'CodeIgniter\Shield\Authentication\Passwords\PwnedValidator',
8989
];
9090
```
91+
92+
You use `strong_password` rule for password validation explained above.
93+
94+
> **Note**
95+
> The `strong_password` rule only supports use cases to check the user's own password.
96+
> It fetches the authenticated user's data for **NothingPersonalValidator**
97+
> if the visitor is authenticated.
98+
>
99+
> If you want to have use cases that set and check another user's password,
100+
> you can't use `strong_password`. You need to use `service('passwords')` directly
101+
> to check the password.
102+
>
103+
> But remember, it is not good practice to set passwords for other users.
104+
> This is because the password should be known only by that user.

0 commit comments

Comments
 (0)