from django.conf import settings


def enabled_social_providers():
    providers = []
    configured = getattr(settings, "SOCIALACCOUNT_PROVIDERS", {})
    labels = {
        "google": "Google",
        "github": "GitHub",
    }
    for provider_id, label in labels.items():
        app = configured.get(provider_id, {}).get("APP", {})
        if app.get("client_id") and app.get("secret"):
            providers.append({"id": provider_id, "label": label})
    return providers
