You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the developer may further want to restrict the user not to have their password contains the value of metadata. For example, the metadata may look like
{
"name": "Louis Chan"
}
The developer may want to enforce that the password does not contain the substring louischan, louis or chan. There are many other rules that one can think of.
Passing the plain password in the hook is not a good idea. The developer may tempt to store it, or even store it in plain text.
I am think of in before_password_update hook, the developer can return a list of rules that the password must validate against. The example here is written in s-expression.
Your solution is definitely more flexible. But I'm also thinking if we end up metadata is a common use cases, maybe we can simply add a setting to let user specifiy some metadata fields' keywords can't appear in password?
My original solution may be a bit too complex. A balanced solution could be in the before_password_update hook, the developer can return a list of words that cannot appear in the password. This is simpler than my original solution yet offer the flexibility to let the developer to derive a list of words from the metadata.
Sounds like could be both solutions (configuration to avoid keywords in metadata, return s-expression / keywords that cannot appear in the password) let's see which one is more useful in real life
Description
Our password policy currently supports
However, the developer may further want to restrict the user not to have their password contains the value of metadata. For example, the metadata may look like
The developer may want to enforce that the password does not contain the substring
louischan
,louis
orchan
. There are many other rules that one can think of.Passing the plain password in the hook is not a good idea. The developer may tempt to store it, or even store it in plain text.
I am think of in
before_password_update
hook, the developer can return a list of rules that the password must validate against. The example here is written in s-expression.Blog Post Specification
Blog Post of the Feature Release
Open Questions
Put a list of open questions here before a complete design / specification is decided
Related Issues
The text was updated successfully, but these errors were encountered: