2021-05-14 11:20:56 +01:00
|
|
|
|
{% extends "withoutnav_template.html" %}
|
|
|
|
|
|
{% from "components/page-header.html" import page_header %}
|
|
|
|
|
|
{% from "components/button/macro.njk" import govukButton %}
|
2021-06-02 18:37:42 +01:00
|
|
|
|
{% from "components/back-link/macro.njk" import govukBackLink %}
|
2021-06-15 14:02:15 +01:00
|
|
|
|
{% from "components/webauthn-api-check.html" import webauthn_api_check %}
|
|
|
|
|
|
{% from "vendor/govuk-frontend/components/error-message/macro.njk" import govukErrorMessage %}
|
2021-05-14 11:20:56 +01:00
|
|
|
|
|
2021-06-02 18:37:42 +01:00
|
|
|
|
{% set page_title = 'Get your security key' %}
|
2021-05-14 11:20:56 +01:00
|
|
|
|
|
2021-06-15 14:02:15 +01:00
|
|
|
|
{% block extra_javascripts_before_body %}
|
|
|
|
|
|
{{ webauthn_api_check() }}
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
2021-05-14 11:20:56 +01:00
|
|
|
|
{% block per_page_title %}
|
|
|
|
|
|
{{ page_title }}
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
2021-07-30 14:42:54 +01:00
|
|
|
|
{% block backLink %}
|
|
|
|
|
|
{{ govukBackLink({ "href": url_for('.user_profile') }) }}
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
2021-05-14 11:20:56 +01:00
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
|
2021-08-11 18:02:50 +01:00
|
|
|
|
{{ govukErrorMessage({
|
|
|
|
|
|
"classes": "banner-dangerous govuk-!-display-none",
|
2021-09-13 16:31:58 +01:00
|
|
|
|
"html": (
|
|
|
|
|
|
'There’s a problem with your security key' +
|
|
|
|
|
|
'<p class="govuk-body">Check you have the right key and try again. ' +
|
|
|
|
|
|
'If this does not work, ' +
|
|
|
|
|
|
'<a class="govuk-link govuk-link--no-visited-state" href=' + url_for('main.support') + ">contact us</a>." +
|
|
|
|
|
|
'</p>'
|
|
|
|
|
|
),
|
2021-08-11 18:02:50 +01:00
|
|
|
|
"attributes": {
|
|
|
|
|
|
"aria-live": "polite",
|
|
|
|
|
|
"tabindex": '-1'
|
|
|
|
|
|
}
|
|
|
|
|
|
}) }}
|
|
|
|
|
|
|
2021-05-14 11:20:56 +01:00
|
|
|
|
<div class="govuk-grid-row">
|
2021-06-02 18:37:42 +01:00
|
|
|
|
<div class="govuk-grid-column-one-half">
|
|
|
|
|
|
{{ page_header(page_title) }}
|
2021-06-15 14:02:15 +01:00
|
|
|
|
|
2021-06-02 18:37:42 +01:00
|
|
|
|
<p class="govuk-body">
|
|
|
|
|
|
You need to have your security key to sign in.
|
|
|
|
|
|
</p>
|
2021-06-15 14:02:15 +01:00
|
|
|
|
|
2021-05-14 11:20:56 +01:00
|
|
|
|
{{ govukButton({
|
|
|
|
|
|
"element": "button",
|
2021-06-02 18:37:42 +01:00
|
|
|
|
"text": "Check security key",
|
2021-06-15 14:02:15 +01:00
|
|
|
|
"classes": "govuk-button--secondary webauthn__api-required",
|
2021-05-14 11:20:56 +01:00
|
|
|
|
"attributes": {
|
|
|
|
|
|
"data-module": "authenticate-security-key",
|
|
|
|
|
|
"data-csrf-token": csrf_token(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}) }}
|
2021-06-15 14:02:15 +01:00
|
|
|
|
|
|
|
|
|
|
{{ govukErrorMessage({
|
|
|
|
|
|
"classes": "webauthn__api-missing",
|
|
|
|
|
|
"text": "Your browser does not support security keys. Try signing in to Notify using a different browser."
|
|
|
|
|
|
}) }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ govukErrorMessage({
|
|
|
|
|
|
"classes": "webauthn__no-js",
|
|
|
|
|
|
"text": "JavaScript is not available for this page. Security keys need JavaScript to work."
|
|
|
|
|
|
}) }}
|
2021-05-14 11:20:56 +01:00
|
|
|
|
</div>
|
2021-06-02 18:37:42 +01:00
|
|
|
|
<div class="govuk-grid-column-one-quarter">
|
2021-09-03 16:00:00 +01:00
|
|
|
|
<img src="{{ asset_url('images/security-key.svg') }}" alt="" class="webauthn-illustration" width="149" height="150">
|
2021-06-02 18:37:42 +01:00
|
|
|
|
</div>
|
2021-05-14 11:20:56 +01:00
|
|
|
|
</div>
|
|
|
|
|
|
{% endblock %}
|