Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce config to allow for password complexity #5727

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kykyi
Copy link

@kykyi kykyi commented Nov 22, 2024

In relation to #5591

This PR introduces application config to allow for password complexity to granularly managed with new validation options for:

  • presence of a lower case letter
  • presence of a upper case letter
  • presence of a number
  • presence of a special character (from a list of special characters that is configurable)

These are all false by default, and configurable like:

Devise.setup do |config|
      config.password_length = 8..128 # (existing)
      config.password_requires_lowercase = true
      config.password_requires_uppercase = true
      config.password_requires_number = true
      config.password_requires_special_character = true
      config.password_special_characters = ":)"
end

Note

  • I haven't run any linting, I couldn't find instructions on what config was used for that 😄
  • I haven't updated any docs, please advise where I need to update if at all 🙏

@kykyi kykyi force-pushed the feautre/provide-config-options-for-password-complexity branch from 7fd350f to 98a037a Compare November 22, 2024 04:02
to be validated in :validatable with lower case,
upper case, numbers, and configurable special character
presence to be validated on.
@kykyi kykyi force-pushed the feautre/provide-config-options-for-password-complexity branch from 98a037a to a6301cc Compare November 22, 2024 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant