Closed CristianPi closed 1 year ago
Just upgraded flask and jwt-extended, followed the migration guide.
@app.before_request def before_request(): # populate the claims on the request verify_jwt_in_request(optional=True) # crash here <-
def verify_token_not_blocklisted(jwt_header: dict, jwt_data: dict) -> None: jwt_manager = get_jwt_manager() if jwt_manager._token_in_blocklist_callback(jwt_header, jwt_data): raise RevokedTokenError(jwt_header, jwt_data)
it seems to work with
jwt_manager._token_in_blocklist_callback(jwt_data)
sorry, i found the problem
@jwt.token_in_blocklist_loader def check_if_token_in_blacklist(decrypted_token): jti = decrypted_token['jti'] return jti in BLACKLIST
forgot to migrate this
Just upgraded flask and jwt-extended, followed the migration guide.
it seems to work with