How to validate password strength with Devise in Ruby on Rails?

好久不见. 提交于 2019-12-03 23:38:14

You can use the Devise Security extension, where you can define a password regexp validation (among other things) and enforce the password strength you want.

I've recently released a devise gem which uses the zxcvbn library to reject weak passwords:

https://github.com/bitzesty/devise_zxcvbn

As of this writing (2018), I'd suggest other-folk to consider the newer Devise Security fork before settling on the previously recommended Devise Security extension gem (stale as of v0.10.0 March 2016, but still OG AF mang!)

edit: This one looks more recent, but idk.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!