API key security

I’m trying to implement algolia search on the backend but when I call on the result event in algolia search helper, the callback is fired asynchronously and the response is returned before the results are set. How can I use it on the backend? If it can’t be used then how can I implement security on the front end? API key and application id are exposed during network requests.

Hi Muhammad ,

Using your Algolia API key on the frontend will expose your API key to any third party.
As such i strongly advise you to NOT use your Aloglia API key on the frontend .

There might be some error on your backend end code which is causing the callback to fire asynchronously
Could you share a bit more on how you are attempting to connect to Algolia via your backend?