def METHOD_NAME(domain: str, secrets) -> dict[str, str]:
    """Iterates over given list of secrets to find the secret that matches the URL in the given imageID
    :param domain: The domain of the imageID of which the correct secret needs to be identified
    :param secrets: List of secrets
    :returns: Dict containing the secret matching the given imageID
    """
    for secret in secrets:
        for url, data in secret['auths'].items():
            if url == domain:
                return data