From f26ac1ccde027faf26778cff46cf9223112e0cb7 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 11 Sep 2022 20:56:30 +1000 Subject: [PATCH] 2fa page templates --- bookwyrm/templates/preferences/2fa.html | 2 +- .../two_factor_login.html | 1 + .../two_factor_auth/two_factor_prompt.html | 92 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) rename bookwyrm/templates/{ => two_factor_auth}/two_factor_login.html (98%) create mode 100644 bookwyrm/templates/two_factor_auth/two_factor_prompt.html diff --git a/bookwyrm/templates/preferences/2fa.html b/bookwyrm/templates/preferences/2fa.html index e5e9684ce..00553b16c 100644 --- a/bookwyrm/templates/preferences/2fa.html +++ b/bookwyrm/templates/preferences/2fa.html @@ -25,7 +25,7 @@ {% csrf_token %}

Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up.

- + {{ qrcode | safe }}
diff --git a/bookwyrm/templates/two_factor_login.html b/bookwyrm/templates/two_factor_auth/two_factor_login.html similarity index 98% rename from bookwyrm/templates/two_factor_login.html rename to bookwyrm/templates/two_factor_auth/two_factor_login.html index 7d31a714b..b110b82d5 100644 --- a/bookwyrm/templates/two_factor_login.html +++ b/bookwyrm/templates/two_factor_auth/two_factor_login.html @@ -46,6 +46,7 @@ {{ form.otp }} {% include 'snippets/form_errors.html' with errors_list=form.current_password.errors id="desc_current_password" %} + diff --git a/bookwyrm/templates/two_factor_auth/two_factor_prompt.html b/bookwyrm/templates/two_factor_auth/two_factor_prompt.html new file mode 100644 index 000000000..650b429c3 --- /dev/null +++ b/bookwyrm/templates/two_factor_auth/two_factor_prompt.html @@ -0,0 +1,92 @@ +{% load layout %} +{% load sass_tags %} +{% load i18n %} +{% load static %} + + + + + {% block title %}BookWyrm{% endblock %} - {{ site.name }} + + + + + +
+
+
+
+ {% block header %} +

+ {% trans "2FA is available" %} +

+ {% endblock %} +
+
+

You can secure your account by setting up two factor authentication in your user preferences. This will require a one-time code from your phone in addition to your password each time you log in.

+ +
+
+
+
+ + + +