Project

auth_eng

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
AuthEng is just Devise only with a different flow.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.1.2
~> 2.2.1
~> 3.1.7
~> 0.3.5
~> 3.2.8
 Project Readme

AuthEng

Motivation

What led me to the creation of this engine was the fact that on several projects that I have worked on, always have the same problems with the gem devise, and almost always because I want that the authentication follows a flow that devise doesn't follow by default.

For example, I don't want people to be able to register themselves, I want it to be done by an authenticated user. And then, these people should receive an account confirmation/activation email, and when they click the link in that email, they can choose their own password.

So, I decided to create an engine, trying to make it as easy as possible to integrate with a newly created application.

Later I will try to clarify the flow of this engine. Any suggestion, thanks.

What it does?

Authentication & Users Mgmt

  • Devise authentication.
  • Users cannot register themselves. It's supposed to be an administrator to do so.
  • When an administrator registers an user, he doesn't choose a password for him. An email is sent, and the user can then confirm his account by choosing a password.
  • Users management backoffice.
  • Emails sent with Delayed Job.
  • Haml views.
  • Formtastic forms.
  • Users deletion with rails3_cts_as_paranoid.
  • Permissions with Cancan.

Usage

###If you don't have delayed_job, in your Gemfile add:

gem 'delayed_job_active_record'

And run:

bundle install
rails generate delayed_job:active_record
rake db:migrate

###Installation In your project:

cd vendor/engines
git clone https://github.com/gustavolobo/AuthEng.git
cd ../..

In your Gemfile:

gem 'auth_eng', :path => "vendor/engines"

Run:

bundle install
rake auth_eng:install:migrations
rake db:migrate

In your routes file:

mount AuthEng::Engine, :at => "/auth_eng"

And then, add an user (don't forget to configure the email in your environment):

AuthEng::Role.create(name: "Administrator")
AuthEng::User.create(name: "user_name", email: "user_email", role_id: 1)

on rails console or seeds.rb (you will receive a confirmation email)

Contributing

If you found a bug or if you think that should be done an improvement in the project, I'll appreciate any contact.