Sha256: 64ce11ad7202f485426fc89de644efdbcc5d1492276afa61c3cde7662e5ab761

Contents?: true

Size: 453 Bytes

Versions: 7

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

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

7 entries across 7 versions & 1 rubygems

Version Path
devise_g5_authenticatable-1.0.3 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.2.rc.3 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.2.rc.2 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.2.rc.1 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.1.rc.1 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.0 lib/devise_g5_authenticatable/omniauth.rb
devise_g5_authenticatable-1.0.0.pre.1 lib/devise_g5_authenticatable/omniauth.rb