summaryrefslogtreecommitdiff
path: root/app/views/otp_enrollments/show.html.erb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-24 13:52:56 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-24 13:52:56 +0200
commitfefec929c59c72dc93e4be30e8f23cd8c5258b0a (patch)
treee35d2e050a9052384e52a5ccb623d8dd193c2370 /app/views/otp_enrollments/show.html.erb
parentcd36a46bbb5679ded1653f65bf4e8a74ae55100c (diff)
Add self-service TOTP enrollment UI and witnessed admin reset
Diffstat (limited to 'app/views/otp_enrollments/show.html.erb')
-rw-r--r--app/views/otp_enrollments/show.html.erb23
1 files changed, 23 insertions, 0 deletions
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 @@
1<h1>Enable second factor</h1>
2
3<div id="page_editor">
4 <div class="node_description">Scan</div>
5 <div class="node_content">
6 <%= raw RQRCode::QRCode.new(current_user.pending_otp_provisioning_uri)
7 .as_svg(:module_size => 4, :viewbox => true,
8 :color => "000", :fill => "fff") %>
9 <span class="field_hint">Or enter the secret manually:
10 <code><%= current_user.otp_pending_secret %></code></span>
11 </div>
12
13 <div class="node_description">Confirm</div>
14 <div class="node_content">
15 <%= form_tag otp_enrollment_path, :method => :put do %>
16 <%= text_field_tag :code, nil, :autofocus => true,
17 :autocomplete => "one-time-code", :inputmode => "numeric" %>
18 <%= submit_tag "Confirm" %>
19 <% end %>
20 <span class="field_hint">Enter the six-digit code your app shows
21 for “<%= OTP_ISSUER %>”.</span>
22 </div>
23</div>