summaryrefslogtreecommitdiffstats
path: root/templates/login.html.template
diff options
context:
space:
mode:
Diffstat (limited to 'templates/login.html.template')
-rw-r--r--templates/login.html.template24
1 files changed, 12 insertions, 12 deletions
diff --git a/templates/login.html.template b/templates/login.html.template
index ae0874a..2a498a5 100644
--- a/templates/login.html.template
+++ b/templates/login.html.template
@@ -27,19 +27,19 @@
</form>
<script>
-async function main() {
- const publicKeyCredential = await navigator.credentials.get({publicKey: {
- challenge: Uint8Array.fromBase64("{{.Challenge}}").buffer,
- }});
- const rsp = publicKeyCredential.response;
- document.getElementById("user").value = new Uint8Array(rsp.userHandle).toBase64();
- document.getElementById("auth-data").value = new Uint8Array(rsp.authenticatorData).toBase64();
- document.getElementById("client-data").value = new Uint8Array(rsp.clientDataJSON).toBase64();
- document.getElementById("sig").value = new Uint8Array(rsp.signature).toBase64();
- document.getElementById("form").submit();
-}
+ async function main() {
+ const publicKeyCredential = await navigator.credentials.get({publicKey: {
+ challenge: Uint8Array.fromBase64("{{.Challenge}}").buffer,
+ }});
+ const rsp = publicKeyCredential.response;
+ document.getElementById("user").value = new Uint8Array(rsp.userHandle).toBase64();
+ document.getElementById("auth-data").value = new Uint8Array(rsp.authenticatorData).toBase64();
+ document.getElementById("client-data").value = new Uint8Array(rsp.clientDataJSON).toBase64();
+ document.getElementById("sig").value = new Uint8Array(rsp.signature).toBase64();
+ document.getElementById("form").submit();
+ }
-main();
+ main();
</script>
This page requires JavaScriptâ„¢ to be enabled