mfa.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {% extends "base.html" %}
  2. {% block content %}
  3. <div class="container">
  4. <div class="row justify-content-center">
  5. <div class="col-lg-12">
  6. <div class="jumbotron text-center p-4">
  7. <h2>Flask + 2FA Demo</h2>
  8. <h4>Setup and Authenticate 2FA</h4>
  9. </div>
  10. </div>
  11. <div class="col-lg-5">
  12. <form>
  13. <div>
  14. <h5>Instructions!</h5>
  15. <ul>
  16. <li>Download <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en&gl=US" target="_blank">Google Authenticator</a> on your mobile.</li>
  17. <li>Create a new account with <strong>setup key</strong> method.</li>
  18. <li>Provide the required details (name, secret key).</li>
  19. <li>Select time-based authentication.</li>
  20. <li>Submit the generated key in the form.</li>
  21. </ul>
  22. </div>
  23. <div class="form-group">
  24. <label for="secret">Secret Token</label>
  25. <input type="text" class="form-control" id="secret" value="{{ secret }}" readonly>
  26. </div>
  27. </form>
  28. </div>
  29. <div class="col-lg-7">
  30. <form method="POST">
  31. {{ form.hidden_tag() }}
  32. <div class="form-group">
  33. <label for="otp">Generated OTP</label>
  34. {{ form.otp() }}
  35. </div>
  36. <div class="text-center">
  37. {{ form.submit() }}
  38. </div>
  39. </form>
  40. </div>
  41. </div>
  42. </div>
  43. {% endblock %}