Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Fix #353, if user use an old access token, then the user will be None…
Browse files Browse the repository at this point in the history
…, so we have to return False if user is None
  • Loading branch information
ychiaoli18 committed Jan 7, 2015
1 parent c7d0ea9 commit 6f6699b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flask_security/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def _check_token():
token = request.json.get(args_key, token)

user = _security.login_manager.token_callback(token)
if user == None:
return False

if user and user.is_authenticated():
app = current_app._get_current_object()
Expand Down

0 comments on commit 6f6699b

Please sign in to comment.