Skip to content

Commit

Permalink
Merge pull request #389 from ubergrape/master
Browse files Browse the repository at this point in the history
Allow more Trello settings
  • Loading branch information
omab committed Sep 20, 2014
2 parents 6591ecb + 81179bd commit 9fc0f4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/backends/trello.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,15 @@ In order to enable it, follow:
SOCIAL_AUTH_TRELLO_KEY = '...'
SOCIAL_AUTH_TRELLO_SECRET = '...'

There are also two optional settings:

- your app name, otherwise the authorization page will say "Let An unknown application use your account?"::

SOCIAL_AUTH_TRELLO_APP_NAME = 'My App'

- the expiration period, social auth defaults to 'never', but you can change it::

SOCIAL_AUTH_TRELLO_EXPIRATION = '30days'


.. _Trello Developers API Keys: https://trello.com/1/appKey/generate
7 changes: 7 additions & 0 deletions social/backends/trello.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ def user_data(self, access_token):
return self.get_json(url, auth=self.oauth_auth(access_token))
except ValueError:
return None

def auth_extra_arguments(self):
return {
'name': self.setting('APP_NAME', ''),
# trello default expiration is '30days'
'expiration': self.setting('EXPIRATION', 'never')
}

0 comments on commit 9fc0f4d

Please sign in to comment.