Skip to content

Commit

Permalink
Change the default OTP name and allow apps to overwrite via translations
Browse files Browse the repository at this point in the history
  • Loading branch information
sfnelson committed Dec 16, 2024
1 parent 04c4ea4 commit 86c24ba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
katalyst-koi (4.15.0)
katalyst-koi (4.15.1)
bcrypt
importmap-rails
katalyst-content
Expand Down
3 changes: 2 additions & 1 deletion app/views/admin/otps/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<ol class="flow">
<li>Install an MFA app. Most password managers support MFA.</li>
<li>Scan this code using your mobile device or password manager:<br>
<%== RQRCode::QRCode.new(admin.otp.provisioning_uri(admin.email)).as_svg(
<% otp_app_name = t("koi.auth.otp_app_name", host: URI.parse(root_url).host, email: admin.email) %>
<%== RQRCode::QRCode.new(admin.otp.provisioning_uri(otp_app_name)).as_svg(
color: "000",
shape_rendering: "crispEdges",
module_size: 3,
Expand Down
1 change: 1 addition & 0 deletions config/locales/koi.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ en:
admin: "%e %B %Y"
koi:
auth:
otp_app_name: "%{host}/admin"
token_invalid: "Token invalid or consumed already"
token_consumed: "Please create a password or passkey"
labels:
Expand Down
2 changes: 1 addition & 1 deletion katalyst-koi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "katalyst-koi"
s.version = "4.15.0"
s.version = "4.15.1"
s.authors = ["Katalyst Interactive"]
s.email = ["[email protected]"]

Expand Down

0 comments on commit 86c24ba

Please sign in to comment.