summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fbin/login.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fbin/login.py b/fbin/login.py
index aa3a399..b365e75 100644
--- a/fbin/login.py
+++ b/fbin/login.py
@@ -28,6 +28,9 @@ class User:
flash('Failed to refresh authentication token (API call returned {} {})'.format(response.status_code, response.reason), 'error')
return
token = response.json()
+ if 'error' in token:
+ flash('Failed to refresh authentication token ({})'.format(token['error']), 'error')
+ return
try:
access_data = jwt.decode(token['access_token'], key = current_app.config['JWT_PUBLIC_KEY'], audience = current_app.config['OAUTH_CLIENT_ID'])
refresh_data = jwt.decode(token['refresh_token'], key = current_app.config['JWT_PUBLIC_KEY'], audience = current_app.config['OAUTH_CLIENT_ID'])