mfa.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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</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. <br>
  30. <div class="col-lg-5 col-md-7 mx-auto my-auto">
  31. <div class="card">
  32. <div class="card-body px-lg-5 py-lg-5 text-center">
  33. <label for="otp"><h2 class="mfa-word">Generated OTP</h2></label>
  34. <form method="POST">
  35. {{ form.hidden_tag() }}
  36. <div class="row mb-4">
  37. {{ form.otp(class="col-lg-6 col-md-6 col-6 ps-0 ps-md-6 mfa-input-box", placeholder="Enter the 6-digit code") }}
  38. </div>
  39. <div class="text-center">
  40. {{ form.submit(class="btn mfa-btn") }}
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. {% endblock %}