@opexa/portal-sdk 0.59.87 → 0.59.88
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/README.md +1634 -1634
- package/dist/{chunk-5WRVWQBT.js → chunk-7APXFZ5G.js} +3 -3
- package/dist/chunk-7APXFZ5G.js.map +1 -0
- package/dist/{chunk-QIUE5GTM.js → chunk-AOATA4DJ.js} +3 -3
- package/dist/chunk-AOATA4DJ.js.map +1 -0
- package/dist/{chunk-ROBGEUSE.js → chunk-WVFSGB7Y.js} +2 -2
- package/dist/chunk-WVFSGB7Y.js.map +1 -0
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +2 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-5WRVWQBT.js.map +0 -1
- package/dist/chunk-QIUE5GTM.js.map +0 -1
- package/dist/chunk-ROBGEUSE.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-
|
|
2
|
-
import { GraphQLClient, isPlainObject } from './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { CmsPortalService, GameService, ExtensionService, FileService, WalletService, AccountService, ReportService, PortalService, TriggerService, AuthService, getFingerPrint } from './chunk-AOATA4DJ.js';
|
|
2
|
+
import { GraphQLClient, isPlainObject } from './chunk-7APXFZ5G.js';
|
|
3
|
+
import './chunk-WVFSGB7Y.js';
|
|
4
4
|
import { ObjectId } from '@opexa/object-id';
|
|
5
5
|
export { ObjectId } from '@opexa/object-id';
|
|
6
6
|
import { App } from '@capacitor/app';
|
|
@@ -704,7 +704,6 @@ var SessionManager = class {
|
|
|
704
704
|
if (!res.ok) {
|
|
705
705
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
706
706
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
707
|
-
localStorage.removeItem(this.storageKey);
|
|
708
707
|
this.v4AccessToken = null;
|
|
709
708
|
this.v4AccessTokenExpiresAt = null;
|
|
710
709
|
}
|
|
@@ -757,7 +756,11 @@ var SessionManager = class {
|
|
|
757
756
|
if (val) {
|
|
758
757
|
try {
|
|
759
758
|
const stored = JSON.parse(val);
|
|
760
|
-
if (stored.version === 4)
|
|
759
|
+
if (stored.version === 4) {
|
|
760
|
+
const valid = await this.verifyV4(stored.session);
|
|
761
|
+
if (!valid) localStorage.removeItem(this.storageKey);
|
|
762
|
+
return valid;
|
|
763
|
+
}
|
|
761
764
|
} catch {
|
|
762
765
|
}
|
|
763
766
|
}
|
|
@@ -1135,7 +1138,6 @@ var SessionManagerCookie = class {
|
|
|
1135
1138
|
if (!res.ok) {
|
|
1136
1139
|
this.logger.error(`Failed to refresh session: ${res.error.message}`);
|
|
1137
1140
|
if (res.error.name === "InvalidTokenError" || res.error.name === "AccountBlacklistedError" || res.error.name === "VerificationLockedError") {
|
|
1138
|
-
cookies.remove(this.storageKey);
|
|
1139
1141
|
this.v4AccessToken = null;
|
|
1140
1142
|
this.v4AccessTokenExpiresAt = null;
|
|
1141
1143
|
}
|
|
@@ -1188,7 +1190,11 @@ var SessionManagerCookie = class {
|
|
|
1188
1190
|
if (val) {
|
|
1189
1191
|
try {
|
|
1190
1192
|
const stored = JSON.parse(val);
|
|
1191
|
-
if (stored.version === 4)
|
|
1193
|
+
if (stored.version === 4) {
|
|
1194
|
+
const valid = await this.verifyV4(stored.session);
|
|
1195
|
+
if (!valid) cookies.remove(this.storageKey);
|
|
1196
|
+
return valid;
|
|
1197
|
+
}
|
|
1192
1198
|
} catch {
|
|
1193
1199
|
}
|
|
1194
1200
|
}
|