diff --git a/app/dashboard/templates/dashboard/setting.html b/app/dashboard/templates/dashboard/setting.html index a55fa180..2ff1ac29 100644 --- a/app/dashboard/templates/dashboard/setting.html +++ b/app/dashboard/templates/dashboard/setting.html @@ -85,22 +85,25 @@ -
-
-
Security Key (WebAuthn)
-
- You can secure your account by linking either your FIDO-supported physical key such as Yubikey, Google Titan, - or a device with appropriate hardware to your account. + {% if current_user.can_use_fido %} +
+
+
Security Key (WebAuthn)
+
+ You can secure your account by linking either your FIDO-supported physical key such as Yubikey, Google + Titan, + or a device with appropriate hardware to your account. +
+ {% if current_user.fido_uuid is none %} + Setup WebAuthn + {% else %} + Disable WebAuthn + {% endif %}
- {% if current_user.fido_uuid is none %} - Setup WebAuthn - {% else %} - Disable WebAuthn - {% endif %}
-
+ {% endif %} -
+
One-Time Password (TOTP)
diff --git a/app/dashboard/views/fido_setup.py b/app/dashboard/views/fido_setup.py index e9432e6c..eec252e1 100644 --- a/app/dashboard/views/fido_setup.py +++ b/app/dashboard/views/fido_setup.py @@ -25,6 +25,13 @@ def fido_setup(): flash("You have already registered your security key", "warning") return redirect(url_for("dashboard.index")) + if not current_user.can_use_fido: + flash( + "This feature is currently in invitation-only beta. Please send us an email if you want to try", + "warning", + ) + return redirect(url_for("dashboard.index")) + fido_token_form = FidoTokenForm() # Handling POST requests