0.0
No commit activity in last 3 years
No release in over 3 years
Official OmniAuth strategy for Memair.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.5

Runtime

~> 0.16
~> 1.5
>= 1.4.0, < 2.0
 Project Readme

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