A
Alokai2mo ago
Darren R

Issues with Authentication

According to the docs here: https://docs.alokai.com/integrations/magento/basics/authenthication, if we are storing the generated token in a 'vsf-customer' cookie, our Magento API calls should be authorised. This doesn't appear to work though, all the responses from Magento are errors saying we need to be authorised. The only way we can get this to work is if we pass the token in a customHeader, like below:
const { data, errors } = await useSdk().magento.customerCart(customQuery, {
Authorization: `Bearer ${customerToken}`,
});
const { data, errors } = await useSdk().magento.customerCart(customQuery, {
Authorization: `Bearer ${customerToken}`,
});
We would prefer not to add this customHeader to all API calls. Any ideas on why storing the token in the vsf-customer cookie doesn't work, as the docs indicate should?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?