Michael Buffington

RoR Salted Hash Login Generator

Sunday, June 12 2005

I’ve been playing around with Tobias Luetke’s Salted Hash Login Generator (not food!) today for Ruby on Rails apps and I’m impressed (which is admittedly easy, but take into account that I’m expecting things to be easy now in Ruby on Rails, so it balances out).

The Salted Hash Login Generator does a whole lot more than what the title suggests. It does indeed create a hashed password, but also: builds controllers, models, and views for user signup, user login, and “forgot password”. It also generates code that emails the user and asks them to verify their email address upon signup and emails them new passwords. And finally, you have some authentication routines that can run before controllers that you want to have a username/password challenge.

It’s well worth the price of $0.00, and does things nearly exactly as I’d expect them to.

I did run into some issues on building the scaffolding for my trial run, and that was mostly my fault. I followed a tutorial that encouraged you to add some localization code in as well. I haven’t tried it out without, but it was easy to strip the localization stuff.

Here’s how to add it your RoR app: