oramasearch / oramacloud-client-javascript

Orama Cloud client for JavaScript and TypeScript
8 stars 2 forks source link

Handle customer AuthToken #37

Closed allevo closed 1 month ago

allevo commented 2 months ago

Ref: https://linear.app/oramasearch/issue/ORM-1644/protect-searches-from-un-desiderated-users Fix: https://linear.app/oramasearch/issue/ORM-1645/define-interface-for-orama-js-sdk

const client = new OramaClient({ ... });
client.setAuthToken("...");
client.setOnAuthTokenExpired(() => client.setAuthToken("...."));
const res = await client.search({ ... })