fix jwt decode

This commit is contained in:
pycook
2020-02-06 09:59:24 +08:00
parent fc85ba21c8
commit db52b28d6b
4 changed files with 18 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ def _auth_with_token():
try:
token = auth_headers
data = jwt.decode(token, current_app.config['SECRET_KEY'])
data = jwt.decode(token, current_app.config['SECRET_KEY'], algorithms=['HS256'])
user = User.query.filter_by(email=data['sub']).first()
if not user:
return False