@or-sdk/auth 0.25.0-beta.2097.0 → 0.25.0-beta.2098.0

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/cjs/Auth.js CHANGED
@@ -167,9 +167,9 @@ var Auth = (function () {
167
167
  var _a;
168
168
  var user = this._getUser;
169
169
  if (this._multiUser)
170
- if ((user === null || user === void 0 ? void 0 : user.expire) < Date.now() - 1000 * 60)
170
+ if ((user === null || user === void 0 ? void 0 : user.expire) < Date.now() + 1000 * 60)
171
171
  this.refreshUserToken();
172
- if (((_a = this._multiUser) === null || _a === void 0 ? void 0 : _a.expire) < Date.now() - 1000 * 60)
172
+ if (((_a = this._multiUser) === null || _a === void 0 ? void 0 : _a.expire) < Date.now() + 1000 * 60)
173
173
  this.refreshMultiUserToken();
174
174
  if (user && !user.multiUserId) {
175
175
  var expire = this.getUserExpire();
package/dist/esm/Auth.js CHANGED
@@ -106,9 +106,9 @@ export class Auth {
106
106
  var _a;
107
107
  const user = this._getUser;
108
108
  if (this._multiUser)
109
- if ((user === null || user === void 0 ? void 0 : user.expire) < Date.now() - 1000 * 60)
109
+ if ((user === null || user === void 0 ? void 0 : user.expire) < Date.now() + 1000 * 60)
110
110
  this.refreshUserToken();
111
- if (((_a = this._multiUser) === null || _a === void 0 ? void 0 : _a.expire) < Date.now() - 1000 * 60)
111
+ if (((_a = this._multiUser) === null || _a === void 0 ? void 0 : _a.expire) < Date.now() + 1000 * 60)
112
112
  this.refreshMultiUserToken();
113
113
  if (user && !user.multiUserId) {
114
114
  const expire = this.getUserExpire();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@or-sdk/auth",
3
- "version": "0.25.0-beta.2097.0",
3
+ "version": "0.25.0-beta.2098.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -17,8 +17,8 @@
17
17
  "dev": "pnpm build:watch:esm"
18
18
  },
19
19
  "dependencies": {
20
- "@or-sdk/sdk-api": "^0.24.13-beta.2097.0",
21
- "@or-sdk/settings": "^0.24.13-beta.2097.0",
20
+ "@or-sdk/sdk-api": "^0.24.13-beta.2098.0",
21
+ "@or-sdk/settings": "^0.24.13-beta.2098.0",
22
22
  "axios": "^0.24.0",
23
23
  "browser-or-node": "^1.2.1",
24
24
  "fingerprintjs2": "^2.1.0",
package/src/Auth.ts CHANGED
@@ -198,8 +198,8 @@ export class Auth {
198
198
  public updateCookieExpiration(): void {
199
199
  const user = this._getUser as any;
200
200
  if (this._multiUser)
201
- if (user?.expire < Date.now() - 1000 * 60) this.refreshUserToken();
202
- if ((this._multiUser as any)?.expire < Date.now() - 1000 * 60) this.refreshMultiUserToken();
201
+ if (user?.expire < Date.now() + 1000 * 60) this.refreshUserToken();
202
+ if ((this._multiUser as any)?.expire < Date.now() + 1000 * 60) this.refreshMultiUserToken();
203
203
 
204
204
  // user without mult
205
205
  if (user && !user.multiUserId) {