This project is archived and is in readonly mode.

#6742 new
Matthew Daubert

[Patch] Allow optional passwords in ActiveModel::SecurePassword

Reported by Matthew Daubert | April 25th, 2011 @ 02:17 PM

The ActiveModel::SecurePassword module is outstanding but I think allowing a password to be optional would allow many more use cases for this feature. E.g. an application using Omniauth in tandem with local authentication probably doesn't require a password for each User. The patch attached adds a :required configuration parameter (defaults to true) and ensures that the authenticate method returns false for a blank password.

This is my first patch submission so please forgive any faux pas I may have made. :)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages