[FEAT] Enable django-allauth for enhanced user management & federation

This commit is contained in:
2023-02-24 19:42:07 +00:00
parent 05ca7433f1
commit 86e18c399d
58 changed files with 1248 additions and 30 deletions

View File

@@ -0,0 +1,3 @@
{% load socialaccount %}
{% providers_media_js %}

View File

@@ -0,0 +1,22 @@
{% load socialaccount %}
{% get_providers as socialaccount_providers %}
{% for provider in socialaccount_providers %}
{% if provider.id == "openid" %}
{% for brand in provider.get_brands %}
<form action="{% provider_login_url provider.id openid=brand.openid_url process=process %}" method="post">
{% csrf_token %}
<button class="btn btn-outline-dark" type="submit">
{{ brand.name }}
</button>
</form>
{% endfor %}
{% endif %}
<form action="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}" method="post">
{% csrf_token %}
<button class="btn btn-outline-dark" type="submit">
{% if provider.name == 'Microsoft Graph' %}Microsoft{% else %}{{provider.name}}{% endif %}
</button>
</form>
{% endfor %}