I have a domain that has 2 different installs of YII2, lets call them old and new site. If I login to the old site and ask to be remembered, then close the browser and then later go to the new sites login page, I am logged in to new site and it takes me to a dashboard.
I looked at changing the cookieValidationKey in web.php
'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
'cookieValidationKey' => 'thisisthenewsitekey',
],
and I looked around the whole request setup but I can't see anything.
Is there a way to separate the 2 logins cookies, so if I'm logged in on old site, I'm not also logged in on new site?
Add to config file:
(Optional) Also you can do, for
csrfParamandidentityCookieIf you use a shared domain or Cross-subdomain authentication: