add account settings page, rest of otp support, stdio credential helper, other misc
[squeep-authentication-module] / lib / template / otp-html.js
index cf7cef686ba7582fe659e36831b69a3e3b70a4ae..066acce57ac308da62d4988c3cf3c4bc62f4e726 100644 (file)
@@ -9,18 +9,18 @@ const { TemplateHelper: th } = require('@squeep/html-template-helper');
 function otpSection(ctx, options) {
   const otpBlurb = (options.otpBlurb || []).map((x) => '\t'.repeat(6) + x).join('\n');
   return `\t\t\t<section class="otp">
-\t\t\t\t<form action="" method="POST">
+\t\t\t\t<form method="POST">
 \t\t\t\t\t<fieldset>
 \t\t\t\t\t\t<legend>Two-Factor Authentication</legend>
 \t\t\t\t\t\t<label for="otp">OTP Code</label>
-\t\t\t\t\t\t<input id="otp" name="otp" value="">
+\t\t\t\t\t\t<input type="tel" id="otp" name="otp" value="">
 \t\t\t\t\t\t<br>
-\t\t\t\t\t\t<button>Confirm</button>
+\t\t\t\t\t\t<button type="submit">Confirm</button>
 ${otpBlurb}
 \t\t\t\t\t</fieldset>
 \t\t\t\t\t<input type="hidden" name="state" value="${ctx.otpState}">
 \t\t\t\t</form>
-\t\t\t</section`;
+\t\t\t</section>`;
 }