Skip to content

Instantly share code, notes, and snippets.

@drKreso
Created November 3, 2018 11:16
Show Gist options
  • Save drKreso/4f16ae48e9c378b0b409b347252607f2 to your computer and use it in GitHub Desktop.
Save drKreso/4f16ae48e9c378b0b409b347252607f2 to your computer and use it in GitHub Desktop.
# config/initializers/oauth.rb
on_failure do |env|
#we need to setup env
if env['omniauth.params'].present
env["devise.mapping"] = Devise.mappings[:user]
end
Devise::OmniauthCallbacksController.action(:failure).call(env)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment