Generate & return webauthn registration challenge

This commit is contained in:
2022-04-20 21:06:53 +02:00
parent 10982190e7
commit 1f0e6d05c8
11 changed files with 336 additions and 4 deletions

View File

@ -0,0 +1,14 @@
{% extends "base_settings_page.html" %}
{% block content %}
<div style="max-width: 700px;">
<p>In order, to continue, please insert your security key & approve the registration request.</p>
<script>
const OPAQUE_STATE = "{{ opaque_state }}";
const REGISTRATION_CHALLENGE = JSON.parse(decodeURIComponent("{{ challenge_json }}"));
</script>
</div>
{% endblock content %}

View File

@ -12,6 +12,7 @@
<p>
<a href="/settings/two_factors/add_totp" type="button" class="btn btn-primary">Add Authenticator App</a>
<a href="/settings/two_factors/add_webauthn" type="button" class="btn btn-primary">Add Security Key</a>
</p>
<table class="table table-hover" style="max-width: 800px;" aria-describedby="Factors list">