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

Development

>= 0

Runtime

 Project Readme

OmniAuth Smile

Smile OAuth2 Strategy for OmniAuth 1.0.

Installing

Add to your Gemfile:

gem 'omniauth-smile'

Then bundle install.

Usage

OmniAuth::Strategies::Smile is simply a Rack middleware. Read the OmniAuth 1.0 docs for detailed instructions.

Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :smile, ENV['SMILE_CLIENT_ID'], ENV['SMILE_CLIENT_SECRET']
end

Configuring

Scope

You can configure the scope, which you pass in to the provider method via a Hash:

  • scope: A comma-separated list of permissions you want to request from the user.
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :smile, ENV['SMILE_CLIENT_ID'], ENV['SMILE_CLIENT_SECRET'], scope: 'customer:read'
end