From 3c30b5d4840568aeb66d452351cc150215d4964f Mon Sep 17 00:00:00 2001 From: kevinsmaster5 Date: Tue, 31 Oct 2023 12:53:28 -0400 Subject: [PATCH] correct some small code inconsistency --- .../set_up_webauthn_platform_selection_presenter.rb | 8 ++++---- .../sign_in_webauthn_platform_selection_presenter.rb | 6 ++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb b/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb index 0b6b826ed24..278fb3b1ad9 100644 --- a/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/set_up_webauthn_platform_selection_presenter.rb @@ -1,14 +1,14 @@ module TwoFactorAuthentication class SetUpWebauthnPlatformSelectionPresenter < SetUpSelectionPresenter - def method - :webauthn_platform - end - def initialize(user:, configuration: nil) @user = user @configuration = configuration end + def method + :webauthn_platform + end + def render_in(view_context, &block) view_context.render( WebauthnInputComponent.new( diff --git a/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb b/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb index d5469a24c6a..b1632c78998 100644 --- a/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb +++ b/app/presenters/two_factor_authentication/sign_in_webauthn_platform_selection_presenter.rb @@ -8,10 +8,8 @@ def render_in(view_context, &block) view_context.render( WebauthnInputComponent.new( platform: true, - passkey_supported_only: configuration.blank?, - show_unsupported_passkey: - configuration.blank? && - IdentityConfig.store.show_unsupported_passkey_platform_authentication_setup, + passkey_supported_only: false, + show_unsupported_passkey: false, ), &block )