How To Use Across Subdomains? With Advanced Application

How to use across subdomains? with advanced application, I tried this way

/common/main-local.php

‘session’ => [

‘savePath’ => ‘\mypath\common\session’,

‘cookieParams’ => [

‘path’ => ‘/’,

‘domain’ => ‘.mydomain.com’,

]

],

‘user’ => [

‘identityClass’ => ‘common\models\User’,

‘enableAutoLogin’ => true,

‘identityCookie’ => [

‘name’ => ‘_mydomain’,

‘domain’ => ‘.mydomain.com’,

‘path’ => ‘/’,

]

],

This example for

mydomain.com

submain1.mydomain.com

subdomain2.mydomain.com

etc

All applications, need get user sessions/cookies, etc.

Any idea?