mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Only check for WebAuthn where it's used
This scopes the check for WebAuthn API to the page where we need it, which will slightly reduce load times for other pages. Since we want this script to execute ASAP, I've added a new block for extra JS to run at the start of the body.
This commit is contained in:
@@ -3,11 +3,16 @@
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
{% from "components/table.html" import mapping_table, row, field, row_heading %}
|
||||
{% from "components/webauthn-api-check.html" import webauthn_api_check %}
|
||||
{% from "vendor/govuk-frontend/components/error-message/macro.njk" import govukErrorMessage %}
|
||||
|
||||
{% set page_title = 'Security keys' %}
|
||||
{% set credentials = current_user.webauthn_credentials %}
|
||||
|
||||
{% block extra_javascripts_before_body %}
|
||||
{{ webauthn_api_check() }}
|
||||
{% endblock %}
|
||||
|
||||
{% block per_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user