Clicking Add to Cart on Instant Search Page - redirect to empty cart

Hi,

We have latest Algolia for Magento 2 extension installed.
So:
Magento 2.2.2
Algolia 1.6.

When user logs in on the Frontend and make a search, for the first time, on the instant search results page when we click the add to cart button we are taken to the cart saying empty cart. On the second time we are taken to the page where we made the search with the item added to the cart.

To reproduce you have to create a user account on the frontend, then on the browser you need to clear all cookies and navigation data for the site, then log-in make a search click add to cart on a result.

Update:

We managed to track down the issue to form_key value after login. After login the window reloads and the cookie form_key gets updated but Algolia keeps old value until another window reload occurs.

Thanks,

Hello Pedro,

I’ve seen on Github that you already solve it.

Can you confirm that?

Hi,

Yes fixed as stated on Github

Thanks,

Hi ,
Can you guys share me the fix