{% extends "security/base.html" %}
{% from "security/_macros.html" import render_field_with_errors, render_field %}

{% block content %}
    {% include "security/_messages.html" %}
    <h1>{{ _fsdomain("Please Reauthenticate") }}</h1>
    <form action="{{ url_for_security("verify") }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}" method="POST"
          name="verify_form">
        {{ verify_form.hidden_tag() }}
        {{ render_field_with_errors(verify_form.password) }}
        {{ render_field(verify_form.submit) }}
    </form>
   {% if has_webauthn_verify_credential %}
      <hr class="fs-gap">
      <h2>Use a WebAuthn Security Key to Reauthenticate</h2>
      <form action="{{ url_for_security("wan_verify") }}{% if 'next' in request.args %}?next={{ request.args.next|urlencode }}{% endif %}" method="POST"
        name="wan_verify_form">
          {{ wan_verify_form.hidden_tag() }}
          {{ render_field(wan_verify_form.submit) }}
      </form>
    {% endif %}
{% endblock %}
