customer is empty

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Muhammad-Nawlo
Posts: 10
Joined: 16 Jul 2024, 02:03

customer is empty

Post by Muhammad-Nawlo » 09 Sep 2024, 14:06

php 8.1
aimeos-laravel 2024.07
aimeoscom/ai-site 2024.07

Hey thank you for your time,
I have a problem,I am using aimeos headless and nextjs for frontend.
When I logged in locally in my laptop the customer return correctly, but when I deploy the project it is return empty customer

cors config is:

'paths' => ['api/*', 'sanctum/csrf-cookie','default/jsonapi/*','sofiasstores/jsonapi/*','hasnastores/jsonapi/*'],

'allowed_methods' => ['*'],

'allowed_origins' => ['https://hasna.shop','https://sofiasstores.com','http://localhost:3000','http://127.0.0.1:3000'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => [],

'max_age' => 0,

'supports_credentials' => true,

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

Re: customer is empty

Post by aimeos » 10 Sep 2024, 08:01

Make sure the Laravel session cookie is sent with each request and the settings are correct if you send it from a different domain.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
Muhammad-Nawlo
Posts: 10
Joined: 16 Jul 2024, 02:03

Re: customer is empty

Post by Muhammad-Nawlo » 10 Sep 2024, 12:31

Thank you,but what do you mean about setting?

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

Re: customer is empty

Post by aimeos » 11 Sep 2024, 08:19

It depends a bit on the API you are using (React, Apollo, fetch, etc.) but cross-origin request require some special settings:
https://developer.mozilla.org/en-US/doc ... n_requests
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply