backend app redirects to domain after login with `remember me`

Hi everyone,

I have a weird problem.

After login to backend app (I`m using the advanced template) any access to the backend app redirect to the domain homepage.

My yii frontend app is in domain.com/app/

My yii backend app is in domain.com/app/admin

After login to backend with remember me checked, accessing domain.com/app/admin/{everything} is redirected (302) to domain.com

Any ideas what can it be?

Could be session data shared by both frontend and backend.

I changed my configurations to:

(backend)




'components' => [

        'request' => [

            'csrfParam' => '_csrf-backend',

            'csrfCookie' => [

                'httpOnly' => true,

                'path' => '/app/admin',

            ],

        ],

        'user' => [

            'identityClass' => 'common\models\User',

            'enableAutoLogin' => true,

            'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true, 'path' => '/app/admin'],

        ],

        'session' => [

            // this is the name of the session cookie used for login on the backend

            'name' => 'advanced-backend',

            'cookieParams' => [

                'path' => '/app/admin',

            ],

        ],



(frontend)




'components' => [

        'request' => [

            'csrfParam' => '_csrf-frontend',

            'csrfCookie' => [

                'httpOnly' => true,

                'path' => '/app',

            ],

        ],

        'user' => [

            'identityClass' => 'common\models\User',

            'enableAutoLogin' => true,

            'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true, 'path' => '/app'],

        ],

        'session' => [

            // this is the name of the session cookie used for login on the frontend

            'name' => 'advanced-frontend',

            'cookieParams' => [

                'path' => '/app',

            ],

        ],



Didn`t help :(