Skip to content

Commit

Permalink
Check for error in case user cancels
Browse files Browse the repository at this point in the history
  • Loading branch information
keanemind committed Jul 29, 2018
1 parent eb7f652 commit 3dd5b02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lostnphoned/sms.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ def authorize():
def oauth2callback():
"""Obtain credentials."""

if flask.request.args.get('error', False):
return flask.redirect('/')

# Specify the state when creating the flow in the callback so that it can
# verified in the authorization server response.
state = flask.session['state']
Expand Down

0 comments on commit 3dd5b02

Please sign in to comment.