diff --git a/deploy/html/user_login_secondfactor.html b/deploy/html/user_login_secondfactor.html index 75eb91d..d07a42b 100644 --- a/deploy/html/user_login_secondfactor.html +++ b/deploy/html/user_login_secondfactor.html @@ -1,28 +1,50 @@ {%- extends "viur_base.html" %} {%- block content %} - {% if action == "otp" %} -

OTP

+

{{ name }}

-
- + {% if action_name == "otp" or action_name == "authenticator_otp" %} + {% if action_name == "otp" -%} +

{% translate "user_second_factor_otp_text", "Please enter your OTP token from your generator." %}

+ {%- elif action_name == "authenticator_otp" -%} +

{% translate "user_second_factor_authenticator_otp_text", "Please enter your OTP token from your authenticator app." %}

+ {%- endif %} -
- {{ embedSvg("icon-cross") }} -
-

Error!

-

The entered token was invaild!

-
-
+ + -
- - -
+ {% for error in skel["errors"] %} +
+ {{ embedSvg("icon-cross") }} +
+

{{ error["errorMessage"] }}

+
+
+ {% endfor %} - -
- {% else %} -
Unimplemented second factor action: {{ action }}
- {% endif %} +
+ {{ embedSvg("icon-cross") }} +
+

{% translate "error", "Error!" %}

+

{% translate "user_second_factor_invalid_token", "The entered token was invalid!" %}

+
+
+ +
+ + +
+ + + + {% else %} +

+ {% translate "user_second_factor_unimplemented", "Unimplemented second factor action:" %} {{ name }} + ({{ action_name }}) +

+ {% endif %} {%- endblock content %} diff --git a/deploy/html/user_second_factor_choice.html b/deploy/html/user_second_factor_choice.html new file mode 100644 index 0000000..78abe13 --- /dev/null +++ b/deploy/html/user_second_factor_choice.html @@ -0,0 +1,17 @@ +{%- extends "viur_base.html" %} + +{%- block content %} +

{% translate "user_second_factor_choice_headline", "Second Factor" %}

+ +

{% translate "user_second_factor_choice_text", "Your account is secured by a second factor. Please choose with which one you want to continue the login." %}

+ +

+ {% translate "user_second_factor_choice_list", "Available factors" %}
+ + {% for second_factor in second_factors %} + {{ translate(second_factor.NAME) }} + {% if not loop.last %}
{% endif %} + {% endfor %} +

+ +{%- endblock content %} diff --git a/deploy/html/user_secondfactor_add.html b/deploy/html/user_secondfactor_add.html new file mode 100644 index 0000000..310dfa6 --- /dev/null +++ b/deploy/html/user_secondfactor_add.html @@ -0,0 +1,33 @@ +{%- extends "viur_base.html" %} + +{%- block content %} +

{% translate "user_second_factor_add_headline", "Add Second Factor" %}: {{ name }}

+ + {% if action_name == "authenticator_otp" %} +

{% translate "user_second_factor_add_authenticator_otp_text", "Please scan the QR code below with your authentication app (Google Authenticator, Authy, ...) and then enter the OTP token in the field below to confirm successful setup." %}

+ + + {{ qrcode(otp_uri) }} + + +
+ + +
+ + +
+ + +
+ {% else %} +

+ {% translate "user_second_factor_unimplemented", "Unimplemented second factor action:" %} {{ name }} + ({{ action_name }}) +

+ {% endif %} +{%- endblock content %} diff --git a/deploy/html/user_secondfactor_add_success.html b/deploy/html/user_secondfactor_add_success.html new file mode 100644 index 0000000..2664f69 --- /dev/null +++ b/deploy/html/user_secondfactor_add_success.html @@ -0,0 +1,15 @@ +{% extends "viur_base.html" %} + +{% block content %} +

{% translate "user_second_factor_add_headline", "Add Second Factor" %}

+ +
+ {{ embedSvg("icon-check") }} +
+

{% translate "user_second_factor_add_success_msg", "Done" %}

+

{% translate "user_second_factor_add_success_text", "Your second factor has been successfully added." %}

+
+
+ + {% translate "login", "Login" %} +{% endblock %}