2
0

Set flash options via redirect where possible (#35370)

This commit is contained in:
Matt Jankowski
2025-07-24 04:03:28 -04:00
committed by GitHub
parent 67be8208db
commit 5c01ccc31f
5 changed files with 7 additions and 14 deletions

View File

@@ -86,13 +86,11 @@ module Settings
private
def redirect_invalid_otp
flash[:error] = t('webauthn_credentials.otp_required')
redirect_to settings_two_factor_authentication_methods_path
redirect_to settings_two_factor_authentication_methods_path, flash: { error: t('webauthn_credentials.otp_required') }
end
def redirect_invalid_webauthn
flash[:error] = t('webauthn_credentials.not_enabled')
redirect_to settings_two_factor_authentication_methods_path
redirect_to settings_two_factor_authentication_methods_path, flash: { error: t('webauthn_credentials.not_enabled') }
end
end
end