Sha256: 567e346f3370d7e1130fda4c62f1da9d6130e777ad87ab95bdd7969d8c61be95
Contents?: true
Size: 883 Bytes
Versions: 12
Compression:
Stored size: 883 Bytes
Contents
# frozen_string_literal: true begin gem "omniauth", ">= 1.0.0" require "omniauth" rescue LoadError warn "Could not load 'omniauth'. Please ensure you have the omniauth gem >= 1.0.0 installed and listed in your Gemfile." raise end # Clean up the default path_prefix. It will be automatically set by Devise. OmniAuth.config.path_prefix = nil OmniAuth.config.on_failure = Proc.new do |env| env['devise.mapping'] = Devise::Mapping.find_by_path!(env['PATH_INFO'], :path) controller_name = ActiveSupport::Inflector.camelize(env['devise.mapping'].controllers[:omniauth_callbacks]) controller_klass = ActiveSupport::Inflector.constantize("#{controller_name}Controller") controller_klass.action(:failure).call(env) end module Devise module OmniAuth autoload :Config, "devise/omniauth/config" autoload :UrlHelpers, "devise/omniauth/url_helpers" end end
Version data entries
12 entries across 11 versions & 4 rubygems