Skip to content

Commit

Permalink
Fix issue with facebook grant
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefsp committed Feb 21, 2015
1 parent 6438426 commit 6a8473e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions provider/oauth2/forms.py
Expand Up @@ -287,8 +287,13 @@ class FacebookAccessTokenForm(ScopeMixin, OAuthForm):

def clean(self):
data = self.cleaned_data
facebook_access_token = data['facebook_access_token']
facebook_id = data['facebook_id']
facebook_access_token = data.get('facebook_access_token')
facebook_id = data.get('facebook_id')
if not facebook_id or not facebook_access_token:
raise OAuthValidationError({'error': 'invalid_grant',
'error_message':'facebook_access_token and '
'facebook_id required'})


url = self.facebook_graph_url % facebook_access_token

Expand Down

0 comments on commit 6a8473e

Please sign in to comment.