At Foodcoop Amsterdam we’d like people to signup directly from the web,
pay the membership fee (online or offline), and start ordering. Right
now, for the signup part, I’ve hacked something together involving login
and invites controllers/views.
I’m wondering - any ideas how to implement this in a clean way? Either
allow people to fill in a form to create user + ordergroup right away,
or to create an invite for such after entering en emailaddress. My rails
knowledge does not yet feel deep enough to come up with the proper
solution. If you have any advice, please share, even if it seems
straightforward to you.
maybe something like Devise  would be helpful? I’m not sure if it is
an overkill and I doesn’t have any experience with it. But I found many
Maybe that is a development strategy question: How much do we want to
code ourselves? How much reuse is reasonable? There might be other parts
of foodsoft, where we could replace foodsoft code by external modules.
Did you discuss this already?
Yep, devise is the defacto standard for authentication in rails. 
But, as we already have implemented many of its features by our own, I
don’t think its a good idea to drop it away and replace it with devise.
And devise doesn’t solve the problem of paying the membership fee.
I would suggest, that you start with a simple sign_up controller, with
an new and create action, which you use to let the users create own
accounts. But before letting the users order, they have to be activated
by the foodsoft administrators. This workflow is easy to implement, and
we can add a configurable welcome message, in where the new members are
asked to pay the membership fee by bank transfer or something else.
I guess, this could also be a nice feature for other foodcoops as well.
But integrating a payment service bring a lot more complexity, security
and compability questions.
I know, this is not as comfortable as normal webshop, but foodcoops
aren’t a comfortable normal webshop, I guess.
With regards to Devise - yes! That would bring features like email
authentication and account locking after failed logins. But most
importantly, as our foodcoop grows, we will probably like to use
multiple software systems. In that case we’d really benefit rfrom a
common authentication solution based on OpenID, SAML, or something else.
At the moment, I’d like to focus on other things, but it’s something I’m
keeping in mind.