Skip to content

memair/omniauth-memair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages