There are various Rails plugins that take care of most of this stuff. I've had great success with restful_authentication (http://github.com/technoweenie/restful-authentication)
Re:The Hacker News Experiment
by steveklabnik on Monday June 21, 2010 @06:56PM
(#1450356)
You should check out AuthLogic. restful-auth's generator based approach is awkward sometimes, and it hasn't been updated in forever...
Devise has been my choice in recent times. but beware it has no roles. it's simple and bakes in everything though. so in 2 commands in the terminal you'll see a login system in your browser including forgot password feature that authlogic doesn't give you.
Making all of those features Samparicio said would be a little tough for code reuse. Engines feature was planned for Rails 3.0 beta but pushed to 3.x. That's the feature that can help code reuse. But it's possible to do this neatly on Django, which allows component-based architecture for apps.
Re:The Hacker News Experiment
by steveklabnik on Monday June 21, 2010 @08:09PM
(#1450486)
Authlogic has no roles either, I use acl9.
Authlogic and forgotten passwords is pretty simple, though. It sort of gives it to you. Well, it gives you the tools. It's really only a tiny bit of coding.
I'll certainly check out Devise though.
Re:The Hacker News Experiment
by japetheape on Tuesday June 22, 2010 @09:31AM
(#1451795)
I was already building something like this and your comment made me push the private beta :P.
Not sure if it covers all your bases, but check out Raible's AppFuse - http://appfuse.org
Your system should allow:
* the creation of superadmin accounts
* Map your user model to my user model
* CRUD users of my application
* Impersonate users of my application so I can see their data
* Expire / suspend / upgrade / downgrade users
* Search for users
* Notify a user via email of something
* Report top users by metric (in the mapping operation above we tell you where to look up these metrics)
* Report new signups per day