1 parent dc7044d commit 8ee78b1Copy full SHA for 8ee78b1
1 file changed
app/models.py
@@ -61,7 +61,8 @@ def generate_token(self, user_id):
61
def decode_token(token):
62
"""Decode the access token from the Authorization header."""
63
try:
64
- payload = jwt.decode(token, current_app.config.get('SECRET'))
+ payload = jwt.decode(token, current_app.config.get(
65
+ 'SECRET'), algorithms=["HS256"])
66
return payload['sub']
67
except jwt.ExpiredSignatureError:
68
return "Expired token. Please log in to get a new token"
0 commit comments