@verdocs/js-sdk 4.2.72 → 4.2.74
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.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1287,17 +1287,17 @@ class VerdocsEndpoint {
|
|
|
1287
1287
|
if (this.persist) {
|
|
1288
1288
|
localStorage.setItem(this.sessionStorageKey(), token);
|
|
1289
1289
|
}
|
|
1290
|
-
if (this.sub !== session.sub) {
|
|
1290
|
+
if (!session.sub || this.sub !== session.sub) {
|
|
1291
1291
|
// The main purpose for this var is to prevent dupe getCurrentProfile calls and the trigger for the dupe
|
|
1292
1292
|
// is usually two components calling loadSession() at the same time to ensure we've done all we could
|
|
1293
1293
|
// to load it. We expose it in case it's useful, but have to set it here instead of in the async callbacks
|
|
1294
1294
|
// even though their might be a brief window of time where it's set but something might go wrong (profile
|
|
1295
1295
|
// doesn't load) because we need it to serve that original purpose more.
|
|
1296
|
+
window?.console?.debug('[JS_SDK] userId changed, loading current profile...', this.endpointId, this.sub, session.sub);
|
|
1296
1297
|
this.sub = session.sub;
|
|
1297
|
-
window?.console?.debug('[JS_SDK] userId changed, loading current profile...', session.sub);
|
|
1298
1298
|
getCurrentProfile(this)
|
|
1299
1299
|
.then((r) => {
|
|
1300
|
-
window?.console?.debug('[JS_SDK] Loaded profile', r);
|
|
1300
|
+
window?.console?.debug('[JS_SDK] Loaded profile', this.endpointId, r);
|
|
1301
1301
|
this.profile = r || null;
|
|
1302
1302
|
this.notifySessionListeners();
|
|
1303
1303
|
})
|
|
@@ -1324,6 +1324,7 @@ class VerdocsEndpoint {
|
|
|
1324
1324
|
* Clear the active session.
|
|
1325
1325
|
*/
|
|
1326
1326
|
clearSession() {
|
|
1327
|
+
window?.console?.debug('[JS_SDK] Clearing session', this.endpointId);
|
|
1327
1328
|
if (this.persist) {
|
|
1328
1329
|
localStorage.removeItem(this.sessionStorageKey());
|
|
1329
1330
|
}
|
|
@@ -1340,6 +1341,7 @@ class VerdocsEndpoint {
|
|
|
1340
1341
|
* Clear the active signing session.
|
|
1341
1342
|
*/
|
|
1342
1343
|
clearSignerSession() {
|
|
1344
|
+
window?.console?.debug('[JS_SDK] Clearing signer session', this.endpointId);
|
|
1343
1345
|
if (this.persist) {
|
|
1344
1346
|
localStorage.removeItem(this.sessionStorageKey());
|
|
1345
1347
|
}
|