Skip to content
Snippets Groups Projects
Verified Commit e3d6fe50 authored by ornanovitch's avatar ornanovitch
Browse files

goodlooking 2FA page

parent 89d7330f
No related branches found
No related tags found
1 merge request!31Resolve "Support du 2FA TOTP"
Pipeline #6613 passed
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{% trans %}Two-factor authentication with Time-based One-Time Password (TOTP){% endtrans %}{% endblock %} {% block title %} {% trans %}Two-factor authentication{% endtrans %} {% endblock %}
{% block subtitle %}{% trans %}with Time-based One-Time Password (TOTP){% endtrans %}{% endblock %}
{% block content %} {% block content %}
{% if infos == {} %} {% if infos == {} %}
<p>{% trans %}Two-factor authentication with Time-based One-Time Passowrd is not setup.{% endtrans %}</p>
<div class="col">
<blockquote class="quote-warning">
<h5>{% trans %}Not configured{% endtrans %}</h5>
<p>{% trans %}Two-factor authentication with Time-based One-Time Passowrd is not setup.{% endtrans %}
<br>
{% trans %}Click on "Setup 2FA" to get started.{% endtrans %}
</p>
</blockquote>
</div>
{% else %} {% else %}
<p>{% trans %}Scan this QR code or use text informations{% endtrans %}</p>
<img src="data:image/png;base64,{{ infos.qr }}" width=300 height=300> <blockquote class="quote-info">
<pre> <h5>{% trans %}Howto{% endtrans %}</h5>
{% trans %}Secret key:{% endtrans %} <code>{{ infos.key }}</code> <p>{% trans %}Scan this QR code or use text informations{% endtrans %}</p>
{% trans %}Name:{% endtrans %} <code>{{ infos.name }}</code> </blockquote>
{% trans %}Issuer:{% endtrans %} <code>{{ infos.issuer }}</code> <div class="row">
</pre> <div class="col-md-6 col text-center">
<img src="data:image/png;base64,{{ infos.qr }}" class="rounded mb-4" width=250 height=250>
</div>
<div class="col-md-6 col">
<ul class="list-group">
<li class="list-group-item">{% trans %}Secret key: {% endtrans %}<code>{{ infos.key }}</code></li>
<li class="list-group-item">{% trans %}Name: {% endtrans %}<code>{{ infos.name }}</code></li>
<li class="list-group-item">{% trans %}Issuer: {% endtrans %}<code>{{ infos.issuer }}</code></li>
</ul>
</div>
</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block actions %} {% block actions %}
{% if infos == {} %} {% if infos == {} %}
<a href="{{ url_for(".totp_setup") }}" class="btn btn-info">{% trans %}Setup 2FA{% endtrans %}</a> <a href="{{ url_for(".totp_setup") }}" class="btn btn-info">{% trans %}Setup 2FA{% endtrans %}</a>
{% else %} {% else %}
<a href="{{ url_for(".totp_delete") }}" class="btn btn-info">{% trans %}Delete 2FA{% endtrans %}</a> <a href="{{ url_for(".totp_delete") }}" class="btn btn-warning">{% trans %}Delete 2FA{% endtrans %}</a>
{% endif %} {% endif %}
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment