bt-core-app 1.4.571 → 1.4.573

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.
@@ -8746,7 +8746,7 @@ function ql() {
8746
8746
  return cc;
8747
8747
  }
8748
8748
  function Mx(e) {
8749
- const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a", n = e.tokenRefreshHourWindow ?? 168;
8749
+ const t = e.expiryTokenFormat ?? "d/MM/yyyy h:mm:ss a", n = e.tokenRefreshMinuteWindow ?? 10800;
8750
8750
  let a = H(localStorage.getItem(pm) ?? "");
8751
8751
  a.value.length == 0 && l();
8752
8752
  function l() {
@@ -8865,8 +8865,8 @@ function Mx(e) {
8865
8865
  return e.tryRefreshToken ?? (e.tryRefreshToken = async () => {
8866
8866
  if (console.log("trying refresh"), e.useTokenRefresh !== !0 || Gn(r.value.refreshToken) || Gn(r.value.refreshExpiresOn))
8867
8867
  return;
8868
- const D = Oe.fromFormat(r.value.refreshExpiresOn, t), V = Oe.utc(), I = D.plus({ hours: 0 - n });
8869
- if (console.log(`testing ${D} with ${V} and if after ${I}`), !(V < D) && !(V < I)) {
8868
+ const D = Oe.fromFormat(r.value.refreshExpiresOn, t), V = Oe.utc(), I = D.plus({ minutes: 0 - n });
8869
+ if (console.log(`testing ${D} with ${V} and if after ${I}`), !(V > D) && !(V < I)) {
8870
8870
  var M = Qt($o(), e.tokenRefreshPath ?? "refreshtoken");
8871
8871
  console.log(`refresh url: ${M}`);
8872
8872
  try {
package/dist/index.d.ts CHANGED
@@ -384,8 +384,8 @@ export declare interface CreateAuthOptions {
384
384
  tokenInvalidPath?: string;
385
385
  /**overrides refresh token and all params below */
386
386
  tryRefreshToken?: (authObj?: any) => Promise<void>;
387
- /**how many hours left on refresh expiry before refreshing | Defaults to 168 (7 days) */
388
- tokenRefreshHourWindow?: number;
387
+ /**how many minutes left on refresh expiry before refreshing | Defaults to 10,800 (7 days) */
388
+ tokenRefreshMinuteWindow?: number;
389
389
  /**if UseTokenRefresh */
390
390
  tokenRefreshPath?: string;
391
391
  /**whether to use token refreshing */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "1.4.571",
3
+ "version": "1.4.573",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {