Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use code to determine ID

Klaus Zanderse51686172c82
diff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/base_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/base_controller.rb
index 88d97c28f84..0f9bfb8bf99 100644
--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/base_controller.rb
+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/base_controller.rb
@@ -196,11 +196,15 @@ module ::TwoFactorAuthentication
end
def webauthn_relying_party
- @webauthn_relying_party ||= WebAuthn::RelyingParty.new(
- origin: "#{Setting.protocol}://#{Setting.host_name}",
- id: Setting.host_name,
- name: Setting.app_title
- )
+ @webauthn_relying_party ||= begin
+ origin = "#{Setting.protocol}://#{Setting.host_name}"
+
+ WebAuthn::RelyingParty.new(
+ origin:,
+ id: URI(origin).host,
+ name: Setting.app_title
+ )
+ end
end
def logout_other_sessions