[Solved] Read Cookies Created On Backend In Frontend

I am using the advanced template, in backend I create some cookies that should be read when the users is in frontend, the problem is that the cookies are codified and I can’t access them in frontend.

I found a solution, if I put in config files the following code:




'request' => [

      'enableCookieValidation' => false

]



This works, but this generate other problems such as errors in console commands like yii migrate.

There are other solution to share cookies between backend and frontend? I think this is a common task that should work withoud problems

I solve this issue by settings the same cookieValidationKey in backend and frontend.




'request'=>array(

     'cookieValidationKey' => 'mykey',

),