{% extends base_template|default:"base.html" %}
{% load static %}
{% load i18n %}

{% block content %}
<script src="{% static 'kagi/base64js.min.js' %}"></script>
<script>
    window.Kagi = window.Kagi || {};
    Kagi.begin_activate = '{% url 'kagi:begin-activate' %}';
    Kagi.begin_assertion = '{% url 'kagi:begin-assertion' %}';
    Kagi.verify_credential_info = '{% url 'kagi:verify-credential-info' %}';
    Kagi.verify_assertion = '{% url 'kagi:verify-assertion' %}';
    Kagi.keys_list = '{% url 'kagi:webauthn-keys' %}';
</script>
{{ block.super }}

{% comment %}
TODO: Handle browser not supporting navigator.credentials API.
{% endcomment %}
<div id="kagi-not-defined-error" style="display: none">
    {% blocktrans %}
    You must be using a compatible browser to use a WebAuthn security key.
    The following browsers are known to be compatible
    {% endblocktrans %}
    <ul>
      <li>{% trans 'Chrome 41 and higher' %}
    </ul>
</div>
{% endblock %}
