We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4599adf commit 139dd4aCopy full SHA for 139dd4a
rest_auth/registration/serializers.py
@@ -63,11 +63,11 @@ def validate(self, attrs):
63
# http://stackoverflow.com/questions/8666316/facebook-oauth-2-0-code-and-token
64
65
# Case 1: We received the access_token
66
- if 'access_token' in attrs and attrs.get('access_token'):
+ if attrs.get('access_token'):
67
access_token = attrs.get('access_token')
68
69
# Case 2: We received the authorization code
70
- elif 'code' in attrs and attrs.get('code'):
+ elif attrs.get('code'):
71
self.callback_url = getattr(view, 'callback_url', None)
72
self.client_class = getattr(view, 'client_class', None)
73
0 commit comments