User is logged out during Shop Interaction

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
schoelli
Posts: 15
Joined: 25 Oct 2017, 17:21

User is logged out during Shop Interaction

Post by schoelli » 23 Aug 2018, 17:46

Hi,

I installed the new Aimeos Laravel Version 2018.07 with Laravel 5.4.
During the interaction (adding products to the basket) all of a sudden the user is logged out from our laravel application and looses the items in his basket.

Can you help me with this issue? What information do you need to investigate this issue further?

Best,
Michael

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: User is logged out during Shop Interaction

Post by aimeos » 23 Aug 2018, 19:25

Are you able to upgrade to Laravel 5.5 LTS? Laravel 5.4 isn't supported any more
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

schoelli
Posts: 15
Joined: 25 Oct 2017, 17:21

Re: User is logged out during Shop Interaction

Post by schoelli » 24 Aug 2018, 14:39

The upgrade of Laravel is only our last option, because it is connected to a lot of dependency updates.

What we saw concerning the issue is when we add some products to the basket, after some time the user is logged out. And the user was logged out, because there was a "Validation Token was expired. Please try again" in the jsonapi call. Maybe this error breaks the session for the user. Any ideas?

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: User is logged out during Shop Interaction

Post by aimeos » 26 Aug 2018, 17:36

Did you remove the this or a similar marker in your templates?

Code: Select all

<!-- catalog.detail.csrf -->...<!-- catalog.detail.csrf -->
This will contain the CSRF tokens that Laravel needs. You can check if you disable caching for development:
https://github.com/aimeos/aimeos-laravel#hints
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

schoelli
Posts: 15
Joined: 25 Oct 2017, 17:21

Re: User is logged out during Shop Interaction

Post by schoelli » 27 Aug 2018, 09:00

No, we did not remove the markers.

What we observed is that, the validation token error happens in the first basket call, when adding a new product to the basket. What we observed as well is that when we manually change the session cookie, then the validation token error happens immediately. So the cause for the error relates to the basket call and the session cookie.

Any ideas?

schoelli
Posts: 15
Joined: 25 Oct 2017, 17:21

Re: User is logged out during Shop Interaction

Post by schoelli » 28 Aug 2018, 13:39

We now experimented with the session driver and saw that with the file session driver it is working without a problem. What could be the breaking issue when using the database session driver? Because for the rest of our laravel requests the database session driver is working fine.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: User is logged out during Shop Interaction

Post by aimeos » 29 Aug 2018, 21:25

There shouldn't be any reason for this because Aimeos uses the Laravel session interface which abstracts from the concrete storage
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply