You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4 KiB

  1. {% extends "base.html" %}
  2. {% load compress static hc_extras %}
  3. {% block content %}
  4. <div class="row">
  5. <form class="col-sm-6 col-sm-offset-3" method="post">
  6. <h1>Set Up Authenticator App</h1>
  7. <p>{% site_name %} supports time-based one-time passwords (TOTP) as a
  8. second authentication factor. To use this method, you will need
  9. an authenticator app on your phone.
  10. </p>
  11. {% csrf_token %}
  12. <div class="spacer"></div>
  13. <p class="add-totp-step">
  14. <strong>Step 1.</strong>
  15. Scan the QR code below using your authentication app.
  16. </p>
  17. <img src="{{ qr_data_uri }}" />
  18. <p class="add-totp-step">
  19. <strong>Step 2.</strong>
  20. Enter the six-digit code from your authenticator app below.
  21. </p>
  22. <div class="form-group {{ form.code.css_classes }}">
  23. <input
  24. type="text"
  25. name="code"
  26. pattern="[0-9]{6}"
  27. title="six-digit code"
  28. placeholder="123456"
  29. class="form-control input-lg" />
  30. {% if form.code.errors %}
  31. <div class="help-block">
  32. {{ form.code.errors|join:"" }}
  33. </div>
  34. {% endif %}
  35. </div>
  36. <div class="form-group text-right">
  37. <input
  38. class="btn btn-primary"
  39. type="submit"
  40. name=""
  41. value="Continue">
  42. </div>
  43. </form>
  44. </div>
  45. {% endblock %}