pulibrary / figgy

Valkyrie-based digital repository backend.
Other
36 stars 4 forks source link

Failing to authorize via CAS should redirect to a valid path. #5559

Open tpendragon opened 2 years ago

tpendragon commented 2 years ago

Failing to authorize should redirect to a valid path.

[Figgy/production] NoMethodError: undefined method `new_session_path' for #Did you mean? new_user_session_path

Backtrace

NoMethodError: undefined method `new_session_path' for #<Users::OmniauthCallbacksController:0x...> Did you mean? new_user_session_path
  [[GEM_ROOT]/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb:30 :in `after_omniauth_failure_path_for`](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-31a842e721cdbc138f7d43b1e40ee341-4bb89cf68e5b)
  [[GEM_ROOT]/gems/devise-4.8.1/app/controllers/devise/omniauth_callbacks_controller.rb:12 :in `failure`](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-a56b2701e7ded6164d317e9ec03001af-327430f205d0)
  [[GEM_ROOT]/gems/actionpack-6.1.6.1/lib/action_controller/metal/basic_implicit_render.rb:6 :in `send_action`](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-ab3cd4c00866add600f9f38e481868df-1d8581ca5727)
  [[GEM_ROOT]/gems/actionpack-6.1.6.1/lib/abstract_controller/base.rb:228 :in `process_action`](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-411b1a8ce6699065b23a2928baa3a91c-f8711a75c384)
  [[GEM_ROOT]/gems/ddtrace-1.2.0/lib/datadog/tracing/contrib/action_pack/action_controller/instrumentation.rb:129 :in `process_action`](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-82e6733d3a5c21075bb7b2d009da7efe-6a343d3a5d19)
  [[GEM_ROOT]/gems/actionpack-6.1.6.1/lib/action_controller/metal/rendering.rb:30 :in `process_acti](https://app.honeybadger.io/projects/53391/faults/90237091#backtrace-line-69f0fa3adbadc50c45b78b5b40ab4804-eb872a660a59)

View full backtrace and more info at honeybadger.io

Implementation

May need to override the after_omniauth_failure_path_for in omniauth_callbacks_controller (or wherever it's getting included)

tpendragon commented 1 year ago

Some more info: I think this is from dubbot crawling the page. This happens when someone clicks the login and doesn't trigger javascript to send it as a POST request.

hackartisan commented 1 year ago

here's another one https://app.honeybadger.io/projects/53391/faults/95483611