Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradpotts/multi-tenancy-warden
bare-bones alternative to mtdevise, adds basecamp style user logins for rails
https://github.com/bradpotts/multi-tenancy-warden
authentication bradpotts engine gem multi-tenancy multi-tenant phcnetworks rails rails-engine ruby ruby-gem
Last synced: 3 months ago
JSON representation
bare-bones alternative to mtdevise, adds basecamp style user logins for rails
- Host: GitHub
- URL: https://github.com/bradpotts/multi-tenancy-warden
- Owner: bradpotts
- License: mit
- Created: 2015-01-20T03:38:00.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2022-04-11T22:39:20.000Z (almost 3 years ago)
- Last Synced: 2024-10-10T06:24:48.169Z (4 months ago)
- Topics: authentication, bradpotts, engine, gem, multi-tenancy, multi-tenant, phcnetworks, rails, rails-engine, ruby, ruby-gem
- Language: Ruby
- Homepage: https://phcdevworks.com
- Size: 282 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
[![security](https://hakiri.io/github/PHCNetworks/multi-tenancy-warden/master.svg)](https://hakiri.io/github/PHCNetworks/multi-tenancy-warden/master)
[![Code Climate](https://codeclimate.com/github/PHCNetworks/multi-tenancy-warden/badges/gpa.svg)](https://codeclimate.com/github/PHCNetworks/multi-tenancy-warden)
[![Gem Version](https://badge.fury.io/rb/mtwarden.svg)](https://badge.fury.io/rb/mtwarden)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/PHCNetworks/multi-tenancy-warden/blob/master/MIT-LICENSE)### MTWarden Rails 5.1 Multi-Tenancy Engine Documentation
PHC MTWarden Rails 5.1 engine adds a separate multi-tenant layer that handles all user registrations, multi-tenancy app functions, and login through subdomains using Warden authentication gem.#### Step 1 - Add Mtwarden to your gemfile and run command
gem 'mtwarden', '~> 17.0'
bundle exec install#### Step 2 - Add and migrate mtwarden database tables
rake railties:install:migrations
rake db:migrate#### Step 3 - Mount the Engine in your Routes File
Add this line at the top of the routes.rb file.require 'mtwarden/constraints/subdomain_required'
#### Step 4 - Mount the Engine in your Routes File
Add this line at the end of the routes.rb file.mount Mtwarden::Engine, :at => '/'
#### Step 5 - Constrain the routes you want secured under multi-tenancy in your routes.rb file.
All the routes you want to have multi-tenancy login functions goes in between the constraints block.constraints(Mtwarden::Constraints::SubdomainRequired) do
# Routes Requiring Security & Multi-Tenancy Routes
end