yii-starter-kit / yii2-starter-kit

Yii2 Starter Kit
http://yii2-starter-kit.terentev.net
Other
1.42k stars 648 forks source link

Single authorization for backend and frontend #728

Closed AScarj closed 4 years ago

AScarj commented 4 years ago

Tell me how to make a single authorization for the backend and frontend. Changing the cookieValidationKey does not solve the problem, since different models are used for the user.

XzAeRo commented 4 years ago

You should change these lines so they use the same cookie validation key and base URL:

https://github.com/yii2-starter-kit/yii2-starter-kit/blob/master/frontend/config/web.php#L50 https://github.com/yii2-starter-kit/yii2-starter-kit/blob/master/backend/config/web.php#L11

dungphanxuan commented 4 years ago

@AScarj can you set session for frontend https://github.com/dungphanxuan/yiiviet.name.vn/blob/master/frontend/config/web.php#L59