login_u2f.html 895 Bytes
Newer Older
ale's avatar
ale committed
1 2
{{template "header" .}}

3
    <form class="form-signin" id="u2fForm" action="{{.URLPrefix}}/login" method="post">
ale's avatar
ale committed
4 5 6
      {{.CSRFField}}
      <input type="hidden" id="u2fResponseField" name="u2f_response" value="">

7 8 9 10 11 12 13 14 15 16
      <div class="row">
          {{if .SiteLogo}}
          <div class="col-md1">
            <img src="./img/site_logo">
          </div>
          {{end}}
          <div class="col-md3">
            <h1 class="form-signin-heading">Sign In / U2F</h1>
          </div>
      </div>
ale's avatar
ale committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

      {{if .Error}}
      <p class="error">
        Authentication failed.
      </p>
      {{end}}

      <p>
        Touch the security key.
      </p>

      <p id="u2fMsg" class="hidden"></p>
      
    </form>

32 33 34 35 36 37 38 39
    {{if .AuthResponse.Has2FAMethod "otp"}}
<p>
  <a href="{{.URLPrefix}}/login?2fa=otp">
    Use a numeric one-time token instead.
  </a>
</p>
    {{end}}

ale's avatar
ale committed
40
{{template "footer" .}}