1616 redirect_field_value (string, optional, default unset) — URL to redirect to after login; hidden input omitted when unset
1717 contributor_account_redirect_message (string, optional, default unset) — message for pre-created author/maintainer accounts; alert omitted when unset
1818{% endcomment %}
19- {% load static %}
19+ {% load static socialaccount %}
2020
2121{% block auth_content %}
2222 < div class ="auth-page__header ">
@@ -28,7 +28,7 @@ <h1 class="auth-page__title">Login to your account</h1>
2828
2929 < form class ="auth-page__card "
3030 method ="post "
31- action =""
31+ action ="{% url 'account_login' %} "
3232 novalidate
3333 {# djlint:off #}
3434 x-data ="{ hasErrors: false } "
@@ -70,8 +70,17 @@ <h1 class="auth-page__title">Login to your account</h1>
7070 < p class ="auth-page__divider "> OR</ p >
7171
7272 < div class ="auth-page__social-card ">
73- {% include "v3/includes/_button.html" with label="Continue with GitHub" url="#" icon_name="github" style="secondary" %}
74- {% include "v3/includes/_button.html" with label="Continue with Google" url="#" icon_name="google-colored" style="secondary" %}
73+ {% get_providers as socialaccount_providers %}
74+ {% if socialaccount_providers %}
75+ {% for provider in socialaccount_providers %}
76+ {% provider_login_url provider process="login" scope=scope auth_params=auth_params as href %}
77+ {% if provider.name == "GitHub" %}
78+ {% include "v3/includes/_button.html" with label="Continue with "|add:provider.name url=href icon_name="github" style="secondary" %}
79+ {% elif provider.name == "Google" %}
80+ {% include "v3/includes/_button.html" with label="Continue with "|add:provider.name url=href icon_name="google-colored" style="secondary" %}
81+ {% endif %}
82+ {% endfor %}
83+ {% endif %}
7584 {% include "v3/includes/_button.html" with label="Don't have an account? Sign up →" url=signup_url style="primary" %}
7685 </ div >
7786{% endblock auth_content %}
0 commit comments