An Omniauth strategy for Trello's OAuth 1.0 authentication.
Read the Trello API documentation for more information on obtaining an application key and secret.
Add this line to your application's Gemfile:
And then bundle:
Or install it yourself as:
$ gem install omniauth-trello
OmniAuth::Strategies::Trello
is a Rack middleware strategy for the OmniAuth gem. Look at the OmniAuth project page for more information on how to use OmniAuth.
Place this into config/initializers/omniauth.rb
:
Rails.application.config.middleware.use OmniAuth::Builder do provider :trello, ENV['TRELLO_KEY'], ENV['TRELLO_SECRET'], app_name: "APP_NAME", scope: 'read,write,account', expiration: 'never' end
The scope
argument defaults to 'read'.
Specify other scopes with a comma separated string (no spaces), example: 'read,write,account'
Contrary to Trello's documentation, user email is only given when using the read,write,account
or read,account
scope.
expiration
if omitted, it defaults to 30 days (Trello default). You can use arguments like: "never", "1day", "30days"
If you don't specify 'never', Trello will ask for user approval on every subsequent login and application will duplicate on the user's account settings page in Trello. I recommend using the never
scope.
More info in the Trello docs
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4