algoliasearch-client-javascript icon indicating copy to clipboard operation
algoliasearch-client-javascript copied to clipboard

getSecuredApiKeyRemainingValidity is not available in browser bundle

Open AlexMeah opened this issue 2 years ago • 2 comments

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?

AlexMeah avatar Dec 05 '23 11:12 AlexMeah

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?

Haroenv avatar Dec 05 '23 13:12 Haroenv

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.

AlexMeah avatar Dec 06 '23 21:12 AlexMeah