feat: add oidc login/logout links to index page
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2024-01-06 16:53:40 +01:00
parent de61148605
commit df1cea7732
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
{% extends "base.html" %}
{% block body %}
{% if user.is_authenticated %}
{{ user.email }}
<form action="{% url 'oidc_logout' %}" method="post">
{% csrf_token %}
<button type="submit">Logout</button>
</form>
{% else %}
<a href="{% url 'oidc_authentication_init' %}">Login</a>
{% endif %}
{% endblock %}

View File

@ -2,4 +2,4 @@ from django.shortcuts import render
def index(request):
return render(request, "base.html", {})
return render(request, "index.html", {})