# Kunden-Login nicht möglich, "'The provided X-CSRF-Token is invalid"

**URL:** <https://forum.shopware.com/t/kunden-login-nicht-moglich-the-provided-x-csrf-token-is-invalid/40047>\
**Category:** Sonstiges\
**Created:** [22. September 2016 um 21:21 UTC](https://forum.shopware.com/t/kunden-login-nicht-moglich-the-provided-x-csrf-token-is-invalid/40047 "2016-09-22T21:21:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![almute](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@almute](https://forum.shopware.com/u/almute)\
**Post date:** [22. September 2016 um 21:21 UTC](https://forum.shopware.com/t/kunden-login-nicht-moglich-the-provided-x-csrf-token-is-invalid/40047/1 "2016-09-22T21:21:46Z")

</div>

Hallo,

seit dem Update auf 5.2.6 gibt es jedes Mal, wenn sich ein Kunde einloggen will, die folgende Fehlermeldung und der Kunde erhält im Frontend ebenfalls eine Fehlermeldung („Ups …“).

&nbsp;

```
exception 'Shopware\Components\CSRFTokenValidationException' with message 'The provided X-CSRF-Token is invalid. Please go back, reload the page and try again.' in /home/almute/www/2k_shop/engine/Shopware/Components/CSRFTokenValidator.php:161
Stack trace:
#0 [internal function]: Shopware\Components\CSRFTokenValidator->checkFrontendTokenValidation(Object(Enlight_Controller_ActionEventArgs))
#1 /home/almute/www/2k_shop/engine/Library/Enlight/Event/Handler/Default.php(91): call_user_func(Array, Object(Enlight_Controller_ActionEventArgs))
#2 /home/almute/www/2k_shop/engine/Library/Enlight/Event/EventManager.php(214): Enlight_Event_Handler_Default->execute(Object(Enlight_Controller_ActionEventArgs))
#3 /home/almute/www/2k_shop/engine/Library/Enlight/Controller/Action.php(143): Enlight_Event_EventManager->notify('Enlight_Control...', Object(Enlight_Controller_ActionEventArgs))
#4 /home/almute/www/2k_shop/engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight_Controller_Action->dispatch('loginAction')
#5 /home/almute/www/2k_shop/engine/Library/Enlight/Controller/Front.php(223): Enlight_Controller_Dispatcher_Default->dispatch(Object(Enlight_Controller_Request_RequestHttp), Object(Enlight_Controller_Response_ResponseHttp))
#6 /home/almute/www/2k_shop/engine/Shopware/Kernel.php(177): Enlight_Controller_Front->dispatch()
#7 /home/almute/www/2k_shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 /home/almute/www/2k_shop/engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
#9 /home/almute/www/2k_shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache->forward(Object(Symfony\Component\HttpFoundation\Request), true)
#10 /home/almute/www/2k_shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(275): Symfony\Component\HttpKernel\HttpCache\HttpCache->pass(Object(Symfony\Component\HttpFoundation\Request), true)
#11 /home/almute/www/2k_shop/engine/Shopware/Components/HttpCache/AppCache.php(133): Symfony\Component\HttpKernel\HttpCache\HttpCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#12 /home/almute/www/2k_shop/vendor/symfony/http-kernel/HttpCache/HttpCache.php(206): Shopware\Components\HttpCache\AppCache->invalidate(Object(Symfony\Component\HttpFoundation\Request), true)
#13 /home/almute/www/2k_shop/engine/Shopware/Components/HttpCache/AppCache.php(114): Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#14 /home/almute/www/2k_shop/shopware.php(113): Shopware\Components\HttpCache\AppCache->handle(Object(Symfony\Component\HttpFoundation\Request))
#15 {main}

```

Zu Umgehung des Problems habe ich vorübergehend in der config.php die&nbsp;csrfProtection ausgeschaltet. Das sollte aber nur eine Notlösung sein

Das Upate auf 5.2.7 hat den Fehler leider nicht behoben.

Hat jemand eine Lösung hierfür?

Vielen Dank, Almute

&nbsp;

---

<div class="post-metadata">

**Author:** ![nidi](https://avatars.discourse-cdn.com/v4/letter/n/848f3c/32.png) [@nidi](https://forum.shopware.com/u/nidi)\
**Post date:** [23. September 2016 um 00:53 UTC](https://forum.shopware.com/t/kunden-login-nicht-moglich-the-provided-x-csrf-token-is-invalid/40047/2 "2016-09-23T00:53:37Z")

</div>

Habe das Problem auch. Das wurde auch schon in der Vergangenheit “erfolglos” diskutiert:

[https://forum.shopware.com/discussion/comment/166095/](https://forum.shopware.com/discussion/comment/166095/)
