Cleanup after omniauth
This commit is contained in:
parent
486de8c3f4
commit
fa4150d47d
9 changed files with 49 additions and 47 deletions
|
@ -1,4 +1,9 @@
|
|||
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||
Gitlab.config.omniauth_providers.each do |provider|
|
||||
define_method provider['name'] do
|
||||
handle_omniauth
|
||||
end
|
||||
end
|
||||
|
||||
# Extend the standard message generation to accept our custom exception
|
||||
def failure_message
|
||||
|
@ -19,12 +24,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
sign_in_and_redirect @user
|
||||
end
|
||||
|
||||
Settings.omniauth_providers.each do |provider|
|
||||
define_method provider['name'] do
|
||||
handle_omniauth
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def handle_omniauth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue