algolia / algoliasearch-client-javascript

⚡️ A fully-featured and blazing-fast JavaScript API client to interact with Algolia.
https://www.algolia.com/doc/api-client/javascript/getting-started/
MIT License
1.33k stars 222 forks source link

getSecuredApiKeyRemainingValidity is not available in browser bundle #1493

Open AlexMeah opened 11 months ago

AlexMeah commented 11 months ago

I am trying to implement automatic key refresh using getSecuredApiKeyRemainingValidity but the function only exported in the node bundle.

Would you accept a PR to make getSecuredApiKeyRemainingValidity work in the browser?

Haroenv commented 11 months ago

Officially this module still supports down to IE11, but as the method would be newly added to browser bundles I think it should be ok. What method do you have in mind that's isomorphic?

AlexMeah commented 11 months ago

Depending on what Node versions you support atob landed as a global in v16 https://github.com/nodejs/node/pull/37786 and is compatible back to IE10.