{% comment %} Social provider buttons shared by the login and signup pages. This snippet is pulled in via a render-time include guarded by SOCIALACCOUNT_ENABLED in the parent template, so the socialaccount tag library below is never loaded when allauth.socialaccount is not in INSTALLED_APPS — the parent pages keep working without it. Each button is account/snippets/provider_button.html, which is where a provider's branding lives and why the buttons are forms rather than links. So this snippet must sit outside the page's own form. Expected context (set by the parent's include tag): process — "login" or "signup", forwarded to provider_login_url verb — button label prefix, e.g. "Continue" or "Sign up" {% endcomment %} {% load dj_auth socialaccount %} {% get_configured_providers as socialaccount_providers %} {% if socialaccount_providers %} {% if process == "login" and PASSKEY_LOGIN_ENABLED %}
or continue with
{% endif %}
{% for provider in socialaccount_providers %} {% provider_login_url provider process=process as provider_href %} {% include "account/snippets/provider_button.html" with provider_id=provider.id name=provider.name href=provider_href verb=verb %} {% endfor %}
{% if process == "signup" %}
or sign up with email
{% endif %} {% endif %}