def verify(user_token): try: return jwt.decode(user_token, token, algorithm="HS256") except (KeyError, jwt.InvalidTokenError): return False