File: two_factor_verify_code.html

package info (click to toggle)
flask-security 5.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 3,448 kB
  • sloc: python: 23,247; javascript: 204; makefile: 138
file content (30 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% set title = title|default(_fsdomain("Two-Factor Authentication")) %}
{% extends "security/base.html" %}
{% from "security/_macros.html" import render_field_with_errors, render_field, prop_next, render_csrf %}

{% block content %}
  {% include "security/_messages.html" %}
  <h1>{{ _fsdomain("Two-Factor Authentication") }}</h1>
  <h3>{{ _fsdomain("Please enter your authentication code generated via: %(method)s", method=chosen_method) }}</h3> {# chosen_method is translated string #}
  <form action="{{ url_for_security('two_factor_token_validation') }}{{ prop_next() }}" method="post" name="two_factor_verify_code_form">
    {{ two_factor_verify_code_form.hidden_tag() }}
    {{ render_field_with_errors(two_factor_verify_code_form.code, placeholder=_fsdomain("enter numeric code")) }}
    {{ render_field(two_factor_verify_code_form.submit) }}
  </form>
  {% if two_factor_rescue_form %}
    <hr class="fs-gap">
    <form action="{{ url_for_security('two_factor_rescue') }}{{ prop_next() }}" method="post" name="two_factor_rescue_form">
      {# explicitly render csrf_token so we can change the ID so we don't get duplicates #}
      {{ render_csrf(two_factor_rescue_form, "rescue") }}
      {{ render_field_with_errors(two_factor_rescue_form.help_setup) }}
      {% if problem=="email" %}
        <div>{{ _fsdomain("The code for authentication was sent to your email address") }}</div>
      {% endif %}
      {% if problem=="help" %}
        <div>{{ _fsdomain("An email was sent to us in order to reset your application account") }}</div>
      {% endif %}
      {{ render_field(two_factor_rescue_form.submit) }}
    </form>
  {% endif %}
  {% include "security/_menu.html" %}
{% endblock content %}