OmniAuth strategy for MyMLH V2.
Switch branches/tags
Clone or download
bih Release 0.3.1
* fixed bug of expecting hash for raw_info[:data][:school] when not having school scope

* added major, minor and release variables in version

* added active_support dependency

* minimum ruby version support is 2.2.4

* improved test support

* added shared_example for rspec test

* added .ruby-version

* bumped up version
Latest commit a2a3b78 Nov 14, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Release 0.3.1 Nov 14, 2016
spec Release 0.3.1 Nov 14, 2016
.gitignore Initial commit Sep 3, 2015
.rspec Initial commit Sep 3, 2015
.ruby-version Release 0.3.1 Nov 14, 2016
.travis.yml Added 2.2.4 to Travis Oct 24, 2016
Gemfile Initial commit Sep 3, 2015
LICENSE.txt Initial commit Sep 3, 2015
README.md Release 0.3.1 Nov 14, 2016
Rakefile Initial commit Sep 3, 2015
omniauth-mlh.gemspec Release 0.3.1 Nov 14, 2016

README.md

MLH/my-mlh-omniauth

Build Status

This is the official OmniAuth strategy for authenticating with MyMLH. To use it, you'll need to register an application and obtain a OAuth Application ID and Secret from MyMLH.

It now supports MyMLH API V2. Read the MyMLH V2 docs here.

Once you have done so, you can follow the instructions below:

Requirements

You need to have at least Ruby 2.2.4 to use this gem.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-mlh'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-mlh

Usage (Rack)

use OmniAuth::Builder do
  provider :mlh, ENV['MY_MLH_KEY'], ENV['MY_MLH_SECRET'], scope: 'default email birthday'
end

Usage (Rails with Devise)

# config/devise.rb

Devise.setup do |config|
  config.provider :mlh, ENV['MY_MLH_KEY'], ENV['MY_MLH_SECRET'], scope: 'default email birthday'
end

Contributing

  1. Fork it ( https://github.com/mlh/my-mlh-omniauth/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Credit

We used part of datariot/omniauth-paypal's code to help us test this gem.

Questions?

Have a question about the API or this library? Start by checking out the official MyMLH documentation. If you still can't find an answer, tweet at @MLHacks or drop an email to engineering@mlh.io.