Sha256: b4c494e129ff84f52d5dad48dab143a671f7170934efb3a17f6bea7e9103ceaf

Contents?: true

Size: 407 Bytes

Versions: 12

Compression:

Stored size: 407 Bytes

Contents

require 'devise/omniauth'
require 'omniauth-g5'

OmniAuth.config.on_failure do |env|
  env['devise.mapping'] = Devise::Mapping.find_by_path!(env['PATH_INFO'], :path)
  controller_name  = ActiveSupport::Inflector.camelize(env['devise.mapping'].controllers[:sessions])
  controller_klass = ActiveSupport::Inflector.constantize("#{controller_name}Controller")
  controller_klass.action(:failure).call(env)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
devise_g5_authenticatable-0.3.0 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.5.beta lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.4 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.4.beta lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.3 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.2 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.1 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.2.0 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.1.3 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.1.2 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.1.1 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-0.1.0 lib/devise_g5_authenticatable/omniauth.rb