Omniauth::Etrade
This is the official OmniAuth strategy for authenticating with ETrade's API. To use it, you'll need a consumer key and consumer secret which can be obtained from ETrade (more information available at developer.etrade.com)
Installation
Add the strategy to your application's Gemfile:
gem 'omniauth-etrade'
And then execute:
bundle
Or install it yourself as:
gem install omniauth-etrade
Usage
Once installation is complete. Integrate the strategy into your middleware:
use OmniAuth::Builder do
provider :etrade, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET']
end
In Rails, you'll want to add to the middleware stack:
Rails.application.config.middleware.use OmniAuth::Builder do
provider :etrade, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET']
end
If using devise, you'll want to declare provider in your config\initializers\devise.rb:
config.omniauth :etrade, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET']
Contributing
- Fork it
- 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