fix jwt decode

This commit is contained in:
pycook
2020-02-06 09:59:24 +08:00
parent 39d13d1993
commit f86a0b49d5
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