Is ProjectApp engine with user managment and authorization. It supports multiple roles and multiple authorization frameworks.
- Include gem to the
Gemfile
gem 'auth', '~> 1.0', git: '[email protected]:werein/auth.git'
- Mount it like Rails engine
mount Auth::Engine => '/auth'
- Install engine
rails g auth:install
Engine configuration can be found in initializers app/config/initializers/auth.yml
.
# Twitter
twitter_key: 'twitter_key'
twitter_secret: 'twitter_secret'
# Facebook
facebook_key: 'facebook_key'
facebook_secret: 'facebook_secret'
In development environment is created user with Administrator abilities We're in
with email [email protected]
when is gem installed and doesn't support Twitter or Facebook authentication.
As default are defined 2 abilities. They can be used in whole app or engine. Feel free to create new one, when you need it.
- Admin
- User
Auth support multiple authorizations for single user. For authorization is used Devise and OmniAuth.
Currently supports
- Email authorization
Auth is dependent on these gems
- devise
- cancancan
- omniauth
- omniauth-twitter
- omniauth-facebook