Skip to content

Commit

Permalink
Set app permissions parameter for flickr
Browse files Browse the repository at this point in the history
fixes #618
  • Loading branch information
pmrowla committed Jun 20, 2015
1 parent 4de2684 commit eb5d237
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions allauth/socialaccount/providers/flickr/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ def get_default_scope(self):
scope = []
return scope

def get_auth_params(self, request, action):
ret = super(FlickrProvider, self).get_auth_params(request,
action)
if 'perms' not in ret:
ret['perms'] = 'read'
return ret

def get_profile_fields(self):
default_fields = ['id',
'first-name',
Expand Down
16 changes: 16 additions & 0 deletions docs/providers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,22 @@ The provider is OAuth2 based. More info:

Note: This is not the same as the Mozilla Persona provider below.

Flickr
------

App registration
https://www.flickr.com/services/apps/create/

You can optionally specify the application permissions to use. If no `perms`
value is set, the Flickr provider will use `read` by default.::

SOCIALACCOUNT_PROVIDERS = \
{ 'flickr':
{ 'AUTH_PARAMS': { 'perms': 'write' } }}

More info:
https://www.flickr.com/services/api/auth.oauth.html#authorization

GitHub
------

Expand Down

0 comments on commit eb5d237

Please sign in to comment.