Best Solution For Authentication in Ruby on Rails

Dan Wolchonok picture Dan Wolchonok · Aug 23, 2008 · Viewed 56.2k times · Source

I'm looking for a pre-built solution I can use in my RoR application. I'm ideally looking for something similar to the ASP.NET Forms authentication that provides email validation, sign-up controls, and allows users to reset their passwords. Oh yeah, and easily allows me to pull the user that is currently logged into the application.

I've started to look into the already written pieces, but I've found it to be really confusing. I've looked at LoginGenerator, RestfulAuthentication, SaltedLoginGenerator, but there doesn't seem to be one place that has great tutorials or provide a comparison of them. If there's a site I just haven't discovered yet, or if there is a de-facto standard that most people use, I'd appreciate the helping hand.

Answer

Brian Armstrong picture Brian Armstrong · Apr 12, 2009

AuthLogic appears to be the new kid on the block and seems to be the next evolution of restful_authentication, easier to use, etc

http://github.com/binarylogic/authlogic/tree/master

Edit: now that Rails 3 is out, Devise seems to be the new, new kid on the block

https://github.com/plataformatec/devise or I have been rolling my own authentication now with the has_secure_password built in to Rails http://railscasts.com/episodes/250-authentication-from-scratch-revised

Side note: Ruby Toolbox is a great site for finding the current best solution in various categories (based on the number of GitHub watchers):

http://ruby-toolbox.com/categories/rails_authentication.html