mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-11-13 12:23:44 +01:00
When the flag is on and an OIDC provider is configured, every e-mail and password check is refused: the login page, the admin and the API's basic auth. OIDC logins, API tokens, OAuth apps and permission checks keep working. The login page hides the password form.
53 lines
2.0 KiB
HTML
53 lines
2.0 KiB
HTML
{% extends "layouts/base_auth.html" %}
|
|
{% load i18n %}
|
|
{% load settings %}
|
|
{% load crispy_forms_tags %}
|
|
{% load socialaccount %}
|
|
|
|
{% block title %}Login{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="min-h-screen flex items-center justify-center p-4">
|
|
<div class="w-full max-w-md">
|
|
{% settings "DEMO" as demo_mode %}
|
|
{% if demo_mode %}
|
|
<div class="card bg-base-100 shadow-xl mb-3">
|
|
<div class="card-body">
|
|
<h1 class="text-lg card-title text-center mb-4">{% trans "Welcome to WYGIWYH's demo!" %}</h1>
|
|
<p>{% trans 'Use the credentials below to login' %}:</p>
|
|
<p>{% trans 'E-mail' %}: <span class="badge badge-secondary select-all">demo@demo.com</span></p>
|
|
<p>{% trans 'Password' %}: <span class="badge badge-secondary select-all">wygiwyhdemo</span></p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="card bg-base-100 shadow-2xl">
|
|
<div class="card-body">
|
|
<h1 class="text-2xl card-title text-center mb-4">Login</h1>
|
|
{% settings "OIDC_DISABLE_LOCAL_LOGIN" as local_login_disabled %}
|
|
{% if not local_login_disabled %}
|
|
{% crispy form %}
|
|
{% endif %}
|
|
|
|
{% get_providers as socialaccount_providers %}
|
|
{% if socialaccount_providers %}
|
|
{% if not local_login_disabled %}
|
|
<hr class="hr my-3">
|
|
{% endif %}
|
|
<ul class="socialaccount_providers list-none flex flex-col gap-3">
|
|
{% for provider in socialaccount_providers %}
|
|
<li>
|
|
<a title="{{ provider.name }}"
|
|
class="btn btn-outline btn-primary w-full socialaccount_provider {{ provider.id }}"
|
|
href="{% provider_login_url provider %}">
|
|
{% translate 'Login with' %} {{ provider.name }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|