V
V
vitaly_742018-02-25 19:48:00
Yii
vitaly_74, 2018-02-25 19:48:00

Why does Yii2 need cookieValidationKey?

Good afternoon, please tell me what this key is for, and why cookie validation is needed in general (if I put it correctly)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-02-25
@vitaly_74

Good evening.
Cookies ans Sessions

K
Konstantin Malyarov, 2018-02-25
@Konstantin18ko

I can just guess. It takes the key from the cookie and does a validation against the database.
Perhaps this is done so that a person enters the site and automatically generates a cookie, then picks up the goods in the basket, where the goods are associated with the cookie.
Closed the tab.
I opened the tab again, the site and looked for cookies in the database and filled the basket with the latest products.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question