2024-02-18 23:03:14 +00:00
|
|
|
{% extends "layout.html.twig" %}
|
2019-01-18 21:46:44 +00:00
|
|
|
|
|
|
|
{% block title %}{{ 'config.page_title'|trans }} > {{ 'config.otp.page_title'|trans }}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<div class="card-panel settings">
|
|
|
|
<div class="row">
|
|
|
|
<h5>{{ 'config.otp.page_title'|trans }}</h5>
|
|
|
|
|
|
|
|
<ol>
|
|
|
|
<li>
|
|
|
|
<p>{{ 'config.otp.app.two_factor_code_description_1'|trans }}</p>
|
|
|
|
<p>{{ 'config.otp.app.two_factor_code_description_2'|trans }}</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<img id="2faQrcode" class="hide-on-med-and-down" />
|
|
|
|
<script>
|
2020-12-18 23:44:16 +00:00
|
|
|
document.getElementById('2faQrcode').src = jrQrcode.getQrBase64('{{ qr_code|raw }}');
|
2019-01-18 21:46:44 +00:00
|
|
|
</script>
|
|
|
|
</p>
|
2020-12-19 11:53:29 +00:00
|
|
|
|
|
|
|
<p>
|
|
|
|
{{ 'config.otp.app.two_factor_code_description_5'|trans }} <pre>{{ secret }}</pre>
|
|
|
|
</p>
|
2019-01-18 21:46:44 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<p>{{ 'config.otp.app.two_factor_code_description_3'|trans }}</p>
|
|
|
|
|
2020-12-19 11:54:03 +00:00
|
|
|
<p><pre>{{ backupCodes|join("\n") }}</pre></p>
|
2019-01-18 21:46:44 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<p>{{ 'config.otp.app.two_factor_code_description_4'|trans }}</p>
|
|
|
|
|
2022-05-03 21:28:20 +00:00
|
|
|
{% for flash_message in app.session.flashbag.get("two_factor") %}
|
2019-01-18 21:46:44 +00:00
|
|
|
<div class="card-panel red darken-1 black-text">
|
2022-05-03 21:28:20 +00:00
|
|
|
{{ flash_message|trans }}
|
2019-01-18 21:46:44 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
<form class="form" action="{{ path("config_otp_app_check") }}" method="post">
|
2023-09-27 09:08:08 +00:00
|
|
|
<input type="hidden" name="token" value="{{ csrf_token('otp') }}" />
|
2019-01-18 21:46:44 +00:00
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="input-field col s12">
|
2019-07-26 11:22:48 +00:00
|
|
|
<label for="_auth_code">{{ "auth_code"|trans({}, 'SchebTwoFactorBundle') }}</label>
|
2019-01-18 21:46:44 +00:00
|
|
|
<input id="_auth_code" type="text" autocomplete="off" name="_auth_code" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="card-action">
|
|
|
|
<button class="btn waves-effect waves-light" type="submit" name="send">
|
|
|
|
{{ 'config.otp.app.enable'|trans }}
|
|
|
|
<i class="material-icons right">send</i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
</ol>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|