Class: Devise::OmniauthCallbacksController
- Inherits:
-
DeviseController
- Object
- DeviseController
- Devise::OmniauthCallbacksController
- Defined in:
- app/controllers/devise/omniauth_callbacks_controller.rb
Instance Method Summary collapse
- #after_omniauth_failure_path_for(scope) ⇒ Object protected
- #failed_strategy ⇒ Object protected
- #failure ⇒ Object
- #failure_message ⇒ Object protected
- #passthru ⇒ Object
Instance Method Details
#after_omniauth_failure_path_for(scope) ⇒ Object (protected)
27 28 29 |
# File 'app/controllers/devise/omniauth_callbacks_controller.rb', line 27 def after_omniauth_failure_path_for(scope) new_session_path(scope) end |
#failed_strategy ⇒ Object (protected)
15 16 17 |
# File 'app/controllers/devise/omniauth_callbacks_controller.rb', line 15 def failed_strategy env["omniauth.error.strategy"] end |
#failure ⇒ Object
8 9 10 11 |
# File 'app/controllers/devise/omniauth_callbacks_controller.rb', line 8 def failure :alert, :failure, kind: OmniAuth::Utils.camelize(failed_strategy.name), reason: redirect_to after_omniauth_failure_path_for(resource_name) end |
#failure_message ⇒ Object (protected)
19 20 21 22 23 24 25 |
# File 'app/controllers/devise/omniauth_callbacks_controller.rb', line 19 def exception = env["omniauth.error"] error = exception.error_reason if exception.respond_to?(:error_reason) error ||= exception.error if exception.respond_to?(:error) error ||= env["omniauth.error.type"].to_s error.to_s.humanize if error end |
#passthru ⇒ Object
4 5 6 |
# File 'app/controllers/devise/omniauth_callbacks_controller.rb', line 4 def passthru render status: 404, text: "Not found. Authentication passthru." end |