enable-two-factor.html 1.82 KB
Newer Older
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
{% extends "dashboard/base.html" %}
{% load i18n %}

{% block content %}
<div class="row">
  <div class="col-md-12">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="no-margin">
          <i class="fa fa-lock"></i>
          {% trans "Enable two-factor authentication" %}
        </h3>
      </div>
      <div class="panel-body">
        {% blocktrans with lang=LANGUAGE_CODE %}
          To use two-factor authentication you need to download Google Authenticator
          and use the following qr code, secret key or link to set it up.
          If you need help with the download or setup check out the
          <a href="https://support.google.com/accounts/answer/1066447?hl={{ lang }}">
            official help page.
          </a>
        {% endblocktrans %}
        <hr />
        <div id="two-factor-qr">
          <span>
            {% blocktrans with secret=secret %}
              Your secret key is: <strong>{{ secret }}</strong>
            {% endblocktrans %}
          </span>
          <img src="//chart.googleapis.com/chart?chs=255x255&chld=L|0&cht=qr&chl={{ uri }}"/>
          <small><a href="{{ uri }}">{{ uri }}</a></small>
        </div>
        <hr />
        <div id="two-factor-confirm">
          <form action="" method="POST">
            {% csrf_token %}
            <input type="hidden" value="{{ secret }}" name="{{ form.two_factor_secret.name }}"/>
            {% blocktrans %}
            If you managed to set up the authenticator click enable to finalize two-factor
            authentication for this account.
            {% endblocktrans %}
            <button type="submit" class="btn btn-success">
              <i class="fa fa-lock"></i>
              {% trans "Enable" %}
            </button>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

{% endblock %}