3 ms·
Any modern Rails app is very likely using bcrypt to store password hashes. It's baked into most of the popular auth frameworks.
by cheald 15y ago
Any modern Rails app is very likely using bcrypt to store password hashes. It's baked into most of the popular auth frameworks.
- JonnieCache 15y agoIt's actually now baked into rails itself. You can declare has_secure_password in the model and you're away.
- lawnchair_larry 15y agoWhy would you have to declare it?
- mguillemot 15y agoBecause it adds a few attributes (like 'password') and methods (like 'authenticate') to your model, and you might not really want such things on every one of your models. Clarification: has_secure_password does NOT mean you choose between secure or non-secure password, it just mean "I want a password on this model, and better make it secure guys!"