Skip to content

Commit

Permalink
Fix failure message
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Sep 17, 2024
1 parent 885b7b0 commit 1997173
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/omni_auth_login_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def callback

def failure
log_omniauth_failure
show_error I18n.t(:error_external_authentication_failed, message: omniauth_error)
show_error I18n.t(:error_external_authentication_failed_message, message: omniauth_error)
end

private
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ en:
Can't rename "%{old_name}" to "%{new_name}" due to a conflict in the resulting menu item
with the existing menu item "%{existing_caption}" (%{existing_identifier}).
error_external_authentication_failed: "An error occurred during external authentication: %{message}"
error_external_authentication_failed_message: "An error occurred during external authentication: %{message}"
error_attribute_not_highlightable: "Attribute(s) not highlightable: %{attributes}"

events:
Expand Down
2 changes: 1 addition & 1 deletion spec/features/auth/omniauth_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def translation_substring(translation)
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
end
visit login_path
expect(page).to have_content(I18n.t(:error_external_authentication_failed))
expect(page).to have_content(I18n.t(:error_external_authentication_failed_message, message: "Unknown error"))

if defined? instructions
expect(page).to have_content instructions
Expand Down

0 comments on commit 1997173

Please sign in to comment.