@opexa/portal-sdk 0.59.83 → 0.59.84
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.cjs +8 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7602,7 +7602,7 @@ var SessionManagerCookie = class {
|
|
|
7602
7602
|
if (val) {
|
|
7603
7603
|
try {
|
|
7604
7604
|
const stored = JSON.parse(val);
|
|
7605
|
-
if (stored.version === 4) return await this.verifyV4();
|
|
7605
|
+
if (stored.version === 4) return await this.verifyV4(stored.session);
|
|
7606
7606
|
} catch {
|
|
7607
7607
|
}
|
|
7608
7608
|
}
|
|
@@ -7617,9 +7617,10 @@ var SessionManagerCookie = class {
|
|
|
7617
7617
|
}
|
|
7618
7618
|
return v;
|
|
7619
7619
|
}
|
|
7620
|
-
async verifyV4() {
|
|
7620
|
+
async verifyV4(session) {
|
|
7621
7621
|
if (!this.v4AccessToken || !this.v4AccessTokenExpiresAt || isAfter(/* @__PURE__ */ new Date(), new Date(this.v4AccessTokenExpiresAt))) {
|
|
7622
|
-
|
|
7622
|
+
const res = await this.refreshV4(session);
|
|
7623
|
+
return res.ok;
|
|
7623
7624
|
}
|
|
7624
7625
|
const v = await this.authService.verifySession(this.v4AccessToken);
|
|
7625
7626
|
if (!v) {
|
|
@@ -8069,7 +8070,7 @@ var SessionManager = class {
|
|
|
8069
8070
|
if (val) {
|
|
8070
8071
|
try {
|
|
8071
8072
|
const stored = JSON.parse(val);
|
|
8072
|
-
if (stored.version === 4) return await this.verifyV4();
|
|
8073
|
+
if (stored.version === 4) return await this.verifyV4(stored.session);
|
|
8073
8074
|
} catch {
|
|
8074
8075
|
}
|
|
8075
8076
|
}
|
|
@@ -8084,9 +8085,10 @@ var SessionManager = class {
|
|
|
8084
8085
|
}
|
|
8085
8086
|
return v;
|
|
8086
8087
|
}
|
|
8087
|
-
async verifyV4() {
|
|
8088
|
+
async verifyV4(session) {
|
|
8088
8089
|
if (!this.v4AccessToken || !this.v4AccessTokenExpiresAt || isAfter(/* @__PURE__ */ new Date(), new Date(this.v4AccessTokenExpiresAt))) {
|
|
8089
|
-
|
|
8090
|
+
const res = await this.refreshV4(session);
|
|
8091
|
+
return res.ok;
|
|
8090
8092
|
}
|
|
8091
8093
|
const v = await this.authService.verifySession(this.v4AccessToken);
|
|
8092
8094
|
if (!v) {
|