twofactor-recovery.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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"}}{{.Title}}{{end}}
  15. {{define "content"}}
  16. <div class="text-center">
  17. <h1 class="h4 text-gray-900 mb-4">{{.Branding.Name}}</h1>
  18. </div>
  19. {{if .Error}}
  20. <div class="alert alert-warning alert-dismissible fade show" role="alert">
  21. {{.Error}}
  22. <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  23. <span aria-hidden="true">&times;</span>
  24. </button>
  25. </div>
  26. {{end}}
  27. <form id="login_form" action="{{.CurrentURL}}" method="POST" autocomplete="off"
  28. class="user-custom">
  29. <div class="form-group">
  30. <input type="text" class="form-control form-control-user-custom"
  31. id="inputRecoveryCode" name="recovery_code" placeholder="Recovery code" spellcheck="false" required>
  32. </div>
  33. <input type="hidden" name="_form_token" value="{{.CSRFToken}}">
  34. <button type="submit" class="btn btn-primary btn-user-custom btn-block">
  35. Verify
  36. </button>
  37. </form>
  38. <hr>
  39. <div>
  40. <p>You can enter one of your recovery codes in case you lost access to your mobile device.</p>
  41. </div>
  42. {{end}}