When add new social account - redirect to accounts page and show notice message
This commit is contained in:
parent
64673acf9f
commit
03c8bf39e1
|
|
@ -44,7 +44,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
||||||
if current_user
|
if current_user
|
||||||
# Add new authentication method
|
# Add new authentication method
|
||||||
current_user.identities.find_or_create_by(extern_uid: oauth['uid'], provider: oauth['provider'])
|
current_user.identities.find_or_create_by(extern_uid: oauth['uid'], provider: oauth['provider'])
|
||||||
redirect_to profile_path
|
redirect_to profile_account_path, notice: 'Authentication method updated'
|
||||||
else
|
else
|
||||||
@user = Gitlab::OAuth::User.new(oauth)
|
@user = Gitlab::OAuth::User.new(oauth)
|
||||||
@user.save
|
@user.save
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue