Skip to content

Commit

Permalink
Fix OAuth 1 integrations.
Browse files Browse the repository at this point in the history
ref: #11
  • Loading branch information
lepture committed Oct 10, 2018
1 parent 769d65c commit 96d4e91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions loginpass/_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def auth(request):
token['id_token'] = id_token
elif id_token:
token = {'id_token': id_token}
elif request.GET.get('oauth_verifier'):
# OAuth 1
token = remote.authorize_access_token(request)
else:
# handle failed
return handle_authorize(remote, None, None)
Expand Down
3 changes: 3 additions & 0 deletions loginpass/_flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def auth():
token['id_token'] = id_token
elif id_token:
token = {'id_token': id_token}
elif request.args.get('oauth_verifier'):
# OAuth 1
token = remote.authorize_access_token()
else:
# handle failed
return handle_authorize(remote, None, None)
Expand Down

0 comments on commit 96d4e91

Please sign in to comment.