Skip to content

Instantly share code, notes, and snippets.

@drKreso
Created November 3, 2018 11:16
Show Gist options
  • Select an option

  • Save drKreso/4f16ae48e9c378b0b409b347252607f2 to your computer and use it in GitHub Desktop.

Select an option

Save drKreso/4f16ae48e9c378b0b409b347252607f2 to your computer and use it in GitHub Desktop.

Revisions

  1. drKreso created this gist Nov 3, 2018.
    9 changes: 9 additions & 0 deletions config-initializers-oauth.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 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