feat: Initial OIDC integration with django-allauth

I've added django-allauth and configured it for OIDC authentication.
This included changes to settings, URLs, and login templates to support OIDC.
I verified that the User model and UserSettings creation are compatible.
I also added documentation for OIDC environment variables to README.md.
This commit is contained in:
google-labs-jules[bot]
2025-05-31 02:31:01 +00:00
parent 99f746b6be
commit 5d5d172b3b
7 changed files with 94 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
{% load i18n %}
{% load settings %}
{% load crispy_forms_tags %}
{% load socialaccount %}
{% block title %}Login{% endblock %}
@@ -25,6 +26,26 @@
<div class="card-body">
<h1 class="h2 card-title text-center mb-4">Login</h1>
{% crispy form %}
<div class="mt-3">
<h2>{% translate "Or login with:" %}</h2>
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
<ul class="socialaccount_providers list-unstyled">
{% for provider in socialaccount_providers %}
{% if provider.id == 'oidc' %}
<li class="mt-2">
<a title="{{provider.name}}" class="btn btn-outline-primary w-100 socialaccount_provider {{provider.id}}" href="{% provider_login_url provider.id process="login" %}">
Login with {{provider.name}}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
<p>{% translate "Social login is not configured." %}</p>
{% endif %}
</div>
</div>
</div>
</div>