Add reveal for TOTP secret for manual entry (#1172)

This commit is contained in:
Jon Charter 2023-04-23 22:43:11 +01:00 committed by GitHub
parent 463f826f6e
commit 64ba31c4d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -101,6 +101,7 @@ class SettingsController < ApplicationController
module_size: 5,
shape_rendering: "crispEdges")
@qr_secret = totp.secret
@qr_svg = "<a href=\"#{totp_url}\">#{qr}</a>"
end

View File

@ -10,6 +10,13 @@
</p>
<%= raw @qr_svg %>
<p>
Or to add to a device manually enter the secret:
<details>
<summary>Reveal Secret</summary>
<%= raw @qr_secret %>
</details>
</p>
<p>
Once you have finished registering with your TOTP application, proceed to