No commit activity in last 3 years
No release in over 3 years
Rails engine for password strength checking
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

~> 5.2.1
 Project Readme

StrongPasswordField

Rails engine for password strength checking

Usage

class User < ApplicationRecord
  include StrongPasswordField

  has_strong_password :password
end
<%= form_for @user do |f| %>
  <%= f.strong_password_field :password %>
  <div class="password-strength-meter">
  </div>
<% end %>
//= require strong_password_field
//= require zxcvbn

document.addEventListener('DOMContentLoaded', function() {
  var strongPasswordField = new StrongPasswordField({
    strengthMeterSelector: '.password-strength-meter'
  });
  strongPasswordField.validate();
});

Installation

Add this line to your application's Gemfile:

gem 'strong_password_field'

And then execute:

$ bundle

Or install it yourself as:

$ gem install strong_password_field

Contributing

Contribution directions go here.

TODOs

  • Add tests and travis-ci
  • Better password strength meter UI
  • Add support for regex

License

The gem is available as open source under the terms of the MIT License.