How to use same user table for different yii2 projects on the same server

I have two yii2 projects in my server under two domain names.They are connected with each other through an anchor link.So now the situation is, for example i am visiting and log in in the first website,then i am going to the second site through that anchor tag.then i have to use the second site without login.Which means i want to use same user table and login sessions for both sites.How can i do that

You could use not external link to 2nd site but to same site to some action that will create url with access token and redirect to 2nd site where you would have to autologin user by his auth token.
https://www.yiiframework.com/doc/guide/2.0/en/security-authentication