twofactor.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <!--
  2. Copyright (C) 2019-2023 Nicola Murino
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as published
  5. by the Free Software Foundation, version 3.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU Affero General Public License for more details.
  10. You should have received a copy of the GNU Affero General Public License
  11. along with this program. If not, see <https://www.gnu.org/licenses/>.
  12. -->
  13. {{template "baselogin" .}}
  14. {{define "title"}}Two-Factor authentication{{end}}
  15. {{define "content"}}
  16. {{if .Error}}
  17. <div class="alert alert-warning alert-dismissible fade show" role="alert">
  18. {{.Error}}
  19. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  20. <span aria-hidden="true">&times;</span>
  21. </button>
  22. </div>
  23. {{end}}
  24. <form id="login_form" action="{{.CurrentURL}}" method="POST" autocomplete="off"
  25. class="user-custom">
  26. <div class="form-group">
  27. <input type="text" class="form-control form-control-user-custom"
  28. id="inputPasscode" name="passcode" placeholder="Authentication code" spellcheck="false" required>
  29. </div>
  30. <input type="hidden" name="_form_token" value="{{.CSRFToken}}">
  31. <button type="submit" class="btn btn-primary btn-user-custom btn-block">
  32. Verify
  33. </button>
  34. </form>
  35. <hr>
  36. <div>
  37. <p>Open the two-factor authentication app on your device to view your authentication code and verify your identity.</p>
  38. </div>
  39. <hr>
  40. <div>
  41. <p><strong>Having problems?</strong></p>
  42. <p><a href="{{.RecoveryURL}}">Enter a two-factor recovery code</a></p>
  43. </div>
  44. {{end}}