feat: add oidc login/logout links to index page
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
de61148605
commit
df1cea7732
|
@ -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 %}
|
|
@ -2,4 +2,4 @@ from django.shortcuts import render
|
|||
|
||||
|
||||
def index(request):
|
||||
return render(request, "base.html", {})
|
||||
return render(request, "index.html", {})
|
||||
|
|
Loading…
Reference in New Issue