how to authenticate with react and do shop configuration???

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!
ridoywsit
Posts: 1
Joined: 09 Feb 2024, 02:21

how to authenticate with react and do shop configuration???

Post by ridoywsit » 09 Feb 2024, 02:32

Hi team,


PHP version: 8.1
Laravel version: 10
Aimeos version: 2023.10
Environment: Linux


I am working on with aimeos project. My frontend in React. I am using the Aimeos JSONAPi. In few areas I am confused.

1. How to authenticate the user and process checkout when user is logged in?? In frontend I am using react. I wrote a login api seems it doesn't serve purpose. Not sure what I am missing.

2. Is it possible to implement social login with facebook and google??

3. Also I am trying to get products from nested category when visiting parent category. Same as category when I clicking on a single category i would like to get all nested category list in one single query. In documentation i see the configuration guideline. But not sure how to write in config/shop.php file. Here is the documentation: https://aimeos.org/docs/2021.x/config/c ... ct/#levels

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

Re: how to authenticate with react and do shop configuration???

Post by aimeos » 12 Feb 2024, 07:29

ridoywsit wrote: 09 Feb 2024, 02:32 1. How to authenticate the user and process checkout when user is logged in?? In frontend I am using react. I wrote a login api seems it doesn't serve purpose. Not sure what I am missing.
The best option is to use JSON Web Tokens (JWT) for authentication. The Aimeos headless distribution has already included it for login:
https://github.com/aimeos/aimeos-headle ... n-rest-api
ridoywsit wrote: 09 Feb 2024, 02:32 2. Is it possible to implement social login with facebook and google??
Laravel offers Socialite, a package for social login:
https://laravel.com/docs/10.x/socialite

You have to check how this works with JWT.
ridoywsit wrote: 09 Feb 2024, 02:32 3. Also I am trying to get products from nested category when visiting parent category. Same as category when I clicking on a single category i would like to get all nested category list in one single query. In documentation i see the configuration guideline. But not sure how to write in config/shop.php file. Here is the documentation: https://aimeos.org/docs/2021.x/config/c ... ct/#levels
Here it's documented how you have to add the configuration to PHP files like in Laravel's ./config/shop.php:
https://aimeos.org/docs/latest/laravel/ ... figuration
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply