From 88e2cc93dfbdef74af501c1d0874ff15270f674b Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 27 May 2021 17:29:28 +0100 Subject: [PATCH] Add image of security key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When referring to something that’s not part of the Notify system, like a spreadsheet or a paper letter or a security key we’ve found it’s helpful to give people a visual representation of it. This commit does the same for security keys. --- app/assets/images/security-key.svg | 73 +++++++++++++++++++ .../views/user-profile/security-keys.html | 62 +++++++++++----- 2 files changed, 117 insertions(+), 18 deletions(-) create mode 100644 app/assets/images/security-key.svg diff --git a/app/assets/images/security-key.svg b/app/assets/images/security-key.svg new file mode 100644 index 000000000..f848b7a89 --- /dev/null +++ b/app/assets/images/security-key.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/templates/views/user-profile/security-keys.html b/app/templates/views/user-profile/security-keys.html index c1df142a8..d9822f041 100644 --- a/app/templates/views/user-profile/security-keys.html +++ b/app/templates/views/user-profile/security-keys.html @@ -18,14 +18,16 @@ {% endblock %} {% block maincolumn_content %} - {{ page_header( - page_title, - back_link=url_for('.user_profile') - ) }} -
-
- {% if credentials %} + + {{ govukBackLink({ "href": url_for('.user_profile') }) }} +
+ {% if credentials %} +
+ {{ page_header( + page_title, + back_link=url_for('.user_profile') + ) }}
{% call mapping_table( caption=page_title, @@ -45,11 +47,44 @@ {% endcall %}
- {% else %} + {{ govukButton({ + "element": "button", + "text": "Register a key", + "classes": "govuk-button--secondary webauthn__api-required", + "attributes": { + "data-module": "register-security-key", + "data-csrf-token": csrf_token(), + } + }) }} +
+ {% else %} +
+ {{ page_header(page_title) }}

- Security keys are an alternative way of signing in to Notify. + Security keys are an alternative way of signing in to Notify, + instead of getting a code in a text message

+

+ You can buy any key that’s compatible with the WebAuthn + standard. +

+ {{ govukButton({ + "element": "button", + "text": "Register a key", + "classes": "govuk-button--secondary webauthn__api-required", + "attributes": { + "data-module": "register-security-key", + "data-csrf-token": csrf_token(), + } + }) }} +
+
+ +
+
+
+
{% endif %} @@ -63,15 +98,6 @@ "text": "JavaScript is not available for this page. Security keys need JavaScript to work." }) }} - {{ govukButton({ - "element": "button", - "text": "Register a key", - "classes": "govuk-button--secondary webauthn__api-required", - "attributes": { - "data-module": "register-security-key", - "data-csrf-token": csrf_token(), - } - }) }}
{% endblock %}