class Devise::OmniauthCallbacksController

Public Instance Methods

failure() click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 8
def failure
  set_flash_message :alert, :failure, kind: OmniAuth::Utils.camelize(failed_strategy.name), reason: failure_message
  redirect_to after_omniauth_failure_path_for(resource_name)
end
passthru() click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 4
def passthru
  render status: 404, text: "Not found. Authentication passthru."
end

Protected Instance Methods

after_omniauth_failure_path_for(scope) click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 27
def after_omniauth_failure_path_for(scope)
  new_session_path(scope)
end
failed_strategy() click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 15
def failed_strategy
  env["omniauth.error.strategy"]
end
failure_message() click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 19
def failure_message
  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
translation_scope() click to toggle source
# File app/controllers/devise/omniauth_callbacks_controller.rb, line 31
def translation_scope
  'devise.omniauth_callbacks'
end