@vulog/aima-client 1.1.66 → 1.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -303,14 +303,7 @@ var getClient = (options) => {
303
303
  if (options.secure) {
304
304
  authentification = refreshTokenAuthentification;
305
305
  } else {
306
- authentification = async () => {
307
- const store = options.store ?? getMemoryStore(options);
308
- const token = await store.getToken();
309
- if (!token?.refreshToken) {
310
- return clientCredentialsAuthentification();
311
- }
312
- return refreshTokenAuthentification();
313
- };
306
+ authentification = clientCredentialsAuthentification;
314
307
  }
315
308
  authentification().then((accessToken) => {
316
309
  refreshSubscribers.forEach((cb) => cb(accessToken));
package/dist/index.mjs CHANGED
@@ -267,14 +267,7 @@ var getClient = (options) => {
267
267
  if (options.secure) {
268
268
  authentification = refreshTokenAuthentification;
269
269
  } else {
270
- authentification = async () => {
271
- const store = options.store ?? getMemoryStore(options);
272
- const token = await store.getToken();
273
- if (!token?.refreshToken) {
274
- return clientCredentialsAuthentification();
275
- }
276
- return refreshTokenAuthentification();
277
- };
270
+ authentification = clientCredentialsAuthentification;
278
271
  }
279
272
  authentification().then((accessToken) => {
280
273
  refreshSubscribers.forEach((cb) => cb(accessToken));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vulog/aima-client",
3
- "version": "1.1.66",
3
+ "version": "1.1.67",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
package/src/getClient.ts CHANGED
@@ -234,14 +234,7 @@ const getClient = (options: ClientOptions): Client => {
234
234
  if (options.secure) {
235
235
  authentification = refreshTokenAuthentification;
236
236
  } else {
237
- authentification = async () => {
238
- const store = options.store ?? getMemoryStore(options);
239
- const token = await store.getToken();
240
- if (!token?.refreshToken) {
241
- return clientCredentialsAuthentification();
242
- }
243
- return refreshTokenAuthentification();
244
- };
237
+ authentification = clientCredentialsAuthentification;
245
238
  }
246
239
 
247
240
  authentification()