{% comment %} Inclusion template for the "maykin_2fa/login.html" template override to offer additional login options over the standard username/password. Requirements: * mozilla-django-oidc-db dependency / installed app Usage: {% block login_form_container %} {% include "maykin_common/maykin_2fa/admin/oidc_login_options.html" with block_super=block.super %} {% endblock login_form_container %} And load the custom CSS: {% block extrastyle %} {{ block.super }} {% endblock %} For more advanced configurations, consider vendoring it in your project or have a chat with other projects/teams if it should be a Maykin-wide feature! {% endcomment %} {% load i18n static mozilla_django_oidc_db %} {% get_oidc_admin_client as oidc_config %} {% if oidc_config.enabled %}
{# Do not present the alternative options in the MFA steps - the user already picked local user account at this point #} {% if wizard.steps.current == 'auth' %} {% trans "Login with organization account" %}
{% trans "or" %}
{% endif %}
{{ block_super }}
{% else %} {{ block_super }} {% endif %}