Bc::RequireGoogleAuth
This gem is a Rack middleware that requires users to authenticate
through google in order to access the protected portions of the
application.
Currently, access is controlled with a hardcoded list of google account
email addresses in the middlware initializer.
Installation
Add this line to your application's Gemfile:
gem 'bc-require-google-auth'
And then execute:
$ bundle
Or install it yourself as:
$ gem install bc-require-google-auth
Usage
require 'bc/require_google_auth'
use Bc::RequireGoogleAuth, allowed_paths: [ "/" ], authorized_emails: [
"stephen@brandedcrate.com",
"otherallowedemail@gmail.com"
]
Contributing
- Fork it ( http://github.com/brandedcrate/bc-require-google-auth/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request