Skip to content

Commit

Permalink
return 401 status is oauth returns none Fixes #177 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
joegasewicz committed Dec 14, 2020
1 parent 5323c9b commit 62db3d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flask_jwt_router/_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ def _handle_token(self):
return abort(401)
except AttributeError:
return abort(401)
except TypeError:
# This is raised from auth_results["email"] not present
abort(401)
else:
# Sometimes a developer may define the auth field name as Bearer or Basic
auth_header = request.headers.get("Authorization")
Expand Down

0 comments on commit 62db3d0

Please sign in to comment.