def METHOD_NAME(
    cls, client_secret: Optional[str], values: Dict[str, Optional[str]]
) -> Optional[str]:
    if values.get("issuer_url") is not None and (
        client_secret is None or values.get("client_id") is None
    ):
        raise ConfigurationError(
            "Missing configuration: client_id and client_secret are mandatory when issuer_url is set."
        )
    return client_secret