binshops / prestashop-rest

PrestaShop REST API module to expose your PrestaShop website's REST endpoints
https://www.binshops.com/prestashop-api
Academic Free License v3.0
95 stars 33 forks source link

Postman problem with endponit #7

Closed cianopman closed 3 years ago

cianopman commented 3 years ago

Hi, I'm testing your module with postman and I be able to make a succesfully login, I get back the PrestaShop cookie but when I try an other endponit (ie AccountInfo) I get the error "User not authenticated". I checked the request header and the cookie is sent with other data. I also tried to make the same on a php page using php cURL code generated by postman but the login endpoint give me the error "An email address required". Using Postman 8.6.2 and Prestashop 1.7.7

Thank you

samberrry commented 3 years ago

Hi @cianopman , thanks for reporting. We will check it.

samberrry commented 3 years ago

https://user-images.githubusercontent.com/20775532/122570145-188f5480-d011-11eb-8631-e98a5f705be9.mov

As I've checked the authentication works well. Please check the way you are setting session cookies.

cianopman commented 3 years ago

Hi @samberrry, I have checked the cookies postman usage, and I don't think there is some problem about that, as you can see by the attached images the login response set the cookies that postman uses to make the accountinfo request. I also saw that in the admin cart panel the new empty cart was created for the related user but the ps_customer_session table still empty. Login request immagine Accountinfo request immagine

Thank you