Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.48 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.48 KB

Gem License Gregology Downloads

Omniauth-memair

Memair OAuth2 Strategy for OmniAuth.

Read the Memair API documentation for more details: https://docs.memair.com/#authenticationcreate_an_app

Installing

Add to your Gemfile:

gem 'omniauth-memair'

Then bundle install.

Usage

OmniAuth::Strategies::Memair is simply a Rack middleware. Read the OmniAuth docs for detailed instructions: https://github.com/intridea/omniauth.

Ensure your Memair app has the user_details scope. Then add the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :memair, ENV['MEMAIR_CLIENT_ID'], ENV['MEMAIR_CLIENT_SECRET']
end

You can pass multiple scopes. For example to read and write a user's biometric data set the scope to biometric_read biometric_write

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :memair, ENV['MEMAIR_CLIENT_ID'], ENV['MEMAIR_CLIENT_SECRET'], scope: 'biometric_read biometric_write'
end