Skip to content

Smile OmniAuth Strategy to quickly connect your app to the Smile.io API.

Notifications You must be signed in to change notification settings

feracommerce/omniauth-smile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Smile OmniAuth Strategy to quickly connect your app to the Smile.io API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages