How to manually logged in certain user?


#1

Case:

I’m using many social login. I check duplicate user creation via Account.onCreateUser whether current logging in user has been registered from his/her another account. If He/She has been registered, I want to logged him/her in with account that he/she registered before instead of creating new account

How to manually logged in certain user?

For example if I check current user has been registered under {_id: “fhgfjdsfgsjdfsa”}. How do I logged in this user "fhgfjdsfgsjdfsa"?

Thanks


#3

Be careful, merging accounts is a really really hard job from a security perspective: