Unable to verify your data submission

Sometimes when i login or logout i get this error “Unable to verify your data submission”. I have the advanced app setup both on a different sub-domain and have different cookieValidationKeys. Sometimes i can login fine but other times not. Disabling CsrfValidation works but i am sure this shouldn’t be the only way to fix the issue. It is the same on both live and production server.

It seems like a problem with cookies and sessions.

Do your front-end and back-end run on different domains? Or are you trying to run them on a shared hosting environment?

I’m having the exact same problem. Weird thing is my client is getting these errors whereas if I log in and do exactly the same thing they’re doing it all works fine. Frustrating because I can’t duplicate their error.

@C Hodges, are you also using the yii2-advanced-app?

I would imagine it has something to do with either the session name or the cookie path.

Yes I am. And thanks for the link.

Sorry for late reply guys! I haven’t received notifications for these posts. I am running on subdomains:

admin.domain.com

.domain.com

I have tested with

‘request’ => [

‘cookieValidationKey’ => ‘vDnre587vu-XAt_FOmc2K6qvwxxpa0Q0’,

‘csrfParam’ => ‘_frontendCSRF’,

],

‘session’ => [

‘name’ => ‘PHPFRONTSESSID’,

],

I still have the same issue.