This is the unofficial Ruby OmniAuth strategy for authenticating to Smooch.
Before you can start developing an integration with Smooch, you need to create an application on your account and ask for a client id and secret.
Add the strategy to your Gemfile
:
gem 'omniauth-smooch'
And bundle.
You can integrate the strategy into your middleware in a config.ru
:
use OmniAuth::Builder do
provider :smooch, ENV['SMOOCH_CLIENT_ID'], ENV['SMOOCH_CLIENT_SECRET'], scope: "integration"
end
If you're using Rails, you'll want to add to the middleware stack:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :smooch, ENV['SMOOCH_CLIENT_ID'], ENV['SMOOCH_CLIENT_SECRET'], scope: "integration"
end
For additional information, refer to the OmniAuth wiki.
omniauth-smooch is released under the MIT License.