Skip to content

Commit

Permalink
Add an alert for the FIDO U2F API deprecation
Browse files Browse the repository at this point in the history
Related to #17229.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jan 21, 2023
1 parent e6392b1 commit 3fc35e6
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions templates/login/twofactor/key.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{% include 'login/twofactor/key-https-warning.twig' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
</p>
</div>
<p>
{% trans "Please connect your FIDO U2F device into your computer's USB port. Then confirm login on the device." %}
</p>
Expand Down
7 changes: 7 additions & 0 deletions templates/login/twofactor/key_configure.twig
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{% include 'login/twofactor/key-https-warning.twig' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
</p>
</div>
<p>
{% trans "Please connect your FIDO U2F device into your computer's USB port. Then confirm registration on the device." %}
</p>
Expand Down
19 changes: 18 additions & 1 deletion templates/preferences/two_factor/main.twig
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
<div class="card-body">
<p>{% trans "You have enabled two factor authentication." %}</p>
<p>{{ backend_description }}</p>
{% if backend_id == 'key' %}
<div class="alert alert-danger" role="alert">
<h4 class="alert-heading">{{ 'Deprecated!'|trans }}</h4>
<p>{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}</p>
<p class="mb-0">
{{ 'You can still use Firefox to authenticate your account using the FIDO U2F API, however it\'s recommended that you use the WebAuthn authentication instead.'|trans }}
</p>
</div>
{% endif %}
<form method="post" action="{{ url('/preferences/two-factor') }}">
{{ get_hidden_inputs() }}
<input class="btn btn-secondary" type="submit" name="2fa_remove" value="
Expand All @@ -75,7 +84,15 @@
<input type="radio" name="2fa_configure" value="{{ backend["id"] }}"
{{- backend["id"] == "" ? ' checked' }}>
<strong>{{ backend["name"] }}</strong>
<p>{{ backend["description"] }}</p>
<p>
{%- if backend['id'] == 'key' -%}
<span class="text-danger">
{{ 'The FIDO U2F API has been deprecated in favor of the Web Authentication API (WebAuthn).'|trans }}
</span>
<br>
{%- endif -%}
{{ backend["description"] }}
</p>
</label>
{% endfor %}
<input class="btn btn-secondary" type="submit" value="{% trans "Configure two-factor authentication" %}">
Expand Down

0 comments on commit 3fc35e6

Please sign in to comment.