@opexa/portal-sdk 0.59.76 → 0.59.77
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/{chunk-BDZPLMTL.js → chunk-3WS4U4B7.js} +22 -10
- package/dist/chunk-3WS4U4B7.js.map +1 -0
- package/dist/index.cjs +40 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +20 -8
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-BDZPLMTL.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-3WS4U4B7.js';
|
|
2
2
|
import { GraphQLClient, isPlainObject } from './chunk-7APXFZ5G.js';
|
|
3
3
|
import './chunk-WVFSGB7Y.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
|
@@ -695,9 +695,18 @@ var SessionManagerCookie = class {
|
|
|
695
695
|
this.logger.warn("'client cookies' is not available on the server.");
|
|
696
696
|
return;
|
|
697
697
|
}
|
|
698
|
+
let version = 1;
|
|
699
|
+
const val = cookies.get(this.storageKey);
|
|
700
|
+
if (val) {
|
|
701
|
+
try {
|
|
702
|
+
const stored = JSON.parse(val);
|
|
703
|
+
version = stored.version ?? 1;
|
|
704
|
+
} catch {
|
|
705
|
+
}
|
|
706
|
+
}
|
|
698
707
|
const res = await this.get();
|
|
699
708
|
if (res.data?.accessToken) {
|
|
700
|
-
await this.authService.destroySession(res.data.accessToken);
|
|
709
|
+
await this.authService.destroySession(res.data.accessToken, version);
|
|
701
710
|
}
|
|
702
711
|
this.v4AccessToken = null;
|
|
703
712
|
this.v4AccessTokenExpiresAt = null;
|
|
@@ -1107,9 +1116,18 @@ var SessionManager = class {
|
|
|
1107
1116
|
this.logger.warn("'localStorage' is not available on the server.");
|
|
1108
1117
|
return;
|
|
1109
1118
|
}
|
|
1119
|
+
let version = 1;
|
|
1120
|
+
const val = localStorage.getItem(this.storageKey);
|
|
1121
|
+
if (val) {
|
|
1122
|
+
try {
|
|
1123
|
+
const stored = JSON.parse(val);
|
|
1124
|
+
version = stored.version ?? 1;
|
|
1125
|
+
} catch {
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1110
1128
|
const res = await this.get();
|
|
1111
1129
|
if (res.data?.accessToken) {
|
|
1112
|
-
await this.authService.destroySession(res.data.accessToken);
|
|
1130
|
+
await this.authService.destroySession(res.data.accessToken, version);
|
|
1113
1131
|
}
|
|
1114
1132
|
this.v4AccessToken = null;
|
|
1115
1133
|
this.v4AccessTokenExpiresAt = null;
|