simple-login/app/dashboard/templates/dashboard/mfa_setup.html

51 lines
1.4 KiB
HTML
Raw Normal View History

{% extends 'default.html' %}
{% set active_page = "setting" %}
{% block title %}
MFA Setup
{% endblock %}
{% block head %}
2020-02-04 09:53:25 +00:00
<script src="{{ url_for('static', filename='node_modules/qrious/dist/qrious.min.js') }}"></script>
{% endblock %}
{% block default_content %}
2020-05-11 21:22:06 +00:00
<div class="card">
<div class="card-body">
<h1 class="h3">Multi Factor Authentication</h1>
<p>Please open a TOTP application (Google Authenticator, Authy, MyDigiPassword, etc)
on your smartphone and scan the following QR Code:
</p>
2020-05-11 21:22:06 +00:00
<canvas id="qr"></canvas>
<script>
(function () {
var qr = new QRious({
element: document.getElementById('qr'),
value: '{{otp_uri}}'
});
})();
</script>
2020-05-11 21:22:06 +00:00
<div class="mt-3 mb-2">
Or you can use the manual entry with the following key:
</div>
2020-05-11 21:22:06 +00:00
<input class="form-control" disabled value="{{ current_user.otp_secret }}">
2020-05-11 21:22:06 +00:00
<form method="post">
{{ otp_token_form.csrf_token }}
2020-05-11 21:22:06 +00:00
<div class="font-weight-bold mt-5">Token</div>
<div class="small-text">Please enter the 6-digit number displayed on your phone.</div>
2020-05-11 21:22:06 +00:00
{{ otp_token_form.token(class="form-control", placeholder="") }}
{{ render_field_errors(otp_token_form.token) }}
<button class="btn btn-lg btn-success mt-2">Validate</button>
</form>
</div>
</div>
{% endblock %}