OAuth2 strategy for omniauth
and
Automatic.
Add this line to your application's Gemfile:
gem 'omniauth-automatic'
And then execute:
$ bundle
Or install it yourself as:
$ gem install omniauth-automatic
You can see a demo version of usage of this gem
at: http://automatic-omniauth-example.herokuapp.com/
You first need to sign up for API access and then register an application.
For use in a Sinatra or Ruby on Rails application:
use OmniAuth::Builder do
provider :automatic, ENV.fetch('AUTOMATIC_CLIENT_ID'), ENV.fetch('AUTOMATIC_CLIENT_SECRET')
end
The API lets you specify scopes to provide focused access. By default you have access to all valid scopes.
use OmniAuth::Builder do
provider :automatic, ENV.fetch('AUTOMATIC_CLIENT_ID'), ENV.fetch('AUTOMATIC_CLIENT_SECRET'), {
scope: 'scope:trip scope:vehicle:profile'
}
end
- Fork it ( http://github.com/Automatic/omniauth-automatic/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This project is licensed under the terms of the Apache 2.0 license.