| ... | ... | @@ -86,7 +86,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController |
|
|
|
log_audit_event(current_user, with: oauth['provider'])
|
|
|
|
|
|
|
|
identity_linker ||= auth_module::IdentityLinker.new(current_user, oauth)
|
|
|
|
identity_linker.link
|
|
|
|
|
|
|
|
link_identity(identity_linker)
|
|
|
|
|
|
|
|
if identity_linker.changed?
|
|
|
|
redirect_identity_linked
|
| ... | ... | @@ -100,6 +101,10 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def link_identity(identity_linker)
|
|
|
|
identity_linker.link
|
|
|
|
end
|
|
|
|
|
|
|
|
def redirect_identity_exists
|
|
|
|
redirect_to after_sign_in_path_for(current_user)
|
|
|
|
end
|
| ... | ... | |
| ... | ... | |