wagn/wagn — pull request #163 by ethn (2014-03-13 20:29:31+00:00)
Title: Users2cards

This is rather massive PR – much larger than I like, and with luck much larger than any I'll ever submit again.

The impetus is that Wikirate decided there was a significant imperative to change the signup process. Consistent user feedback was that it was annoying not to feel like you control your own password. Filling out the captcha, cutting and pasting from an email, difficulty editing the password, etc. Users found the whole process annoying. The new desired model was to signup (with a password), receive a verification email with a token, click to confirm, and be signed in and ready to go.

My first approach was to look at devise, but that took me further and further from MoVE. Everything was done in the controller, a lot of additional user fields were needed. I still believe the libraries it depends on (warden, openauth, etc) may be useful to us, but devise is too railsy.

I decided to bite the bullet and start working on moving all the users to cards. See both of these wagn tickets for reference:

http://wagn.org/move_account_info_into_cards
http://wagn.org/Refactor_Out_Admin_and_Account_Controllers

This PR is not yet ready for merging but is here for comment / discussion.

Some of the things it achieves:

- migrations to move account info from users into cards
- enhancements to the subcard api
- moving of signin / signout / setup into cards
- token-based authentication
- all authentication out of controllers

There's still a good bit of work to do, especially:
- activation on setup
- approval-based signups
- token-based forgot passwords
- invitations that fit the new model