From fefec929c59c72dc93e4be30e8f23cd8c5258b0a Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 24 Jul 2026 13:52:56 +0200 Subject: Add self-service TOTP enrollment UI and witnessed admin reset --- app/views/otp_enrollments/show.html.erb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 app/views/otp_enrollments/show.html.erb (limited to 'app/views/otp_enrollments/show.html.erb') diff --git a/app/views/otp_enrollments/show.html.erb b/app/views/otp_enrollments/show.html.erb new file mode 100644 index 00000000..9dfa3422 --- /dev/null +++ b/app/views/otp_enrollments/show.html.erb @@ -0,0 +1,23 @@ +

Enable second factor

+ +
+
Scan
+
+ <%= raw RQRCode::QRCode.new(current_user.pending_otp_provisioning_uri) + .as_svg(:module_size => 4, :viewbox => true, + :color => "000", :fill => "fff") %> + Or enter the secret manually: + <%= current_user.otp_pending_secret %> +
+ +
Confirm
+
+ <%= form_tag otp_enrollment_path, :method => :put do %> + <%= text_field_tag :code, nil, :autofocus => true, + :autocomplete => "one-time-code", :inputmode => "numeric" %> + <%= submit_tag "Confirm" %> + <% end %> + Enter the six-digit code your app shows + for “<%= OTP_ISSUER %>”. +
+
-- cgit v1.3