@nu-art/user-account-frontend 0.401.0 → 0.401.2

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.
@@ -49,15 +49,26 @@ class ModuleFE_Session_Class extends Module {
49
49
  const sessionId = typeof responseHeader === 'string' ? responseHeader : responseHeader[0];
50
50
  this.StorageKey_SessionId.set(sessionId);
51
51
  });
52
+ const prevSessionId = this.StorageKey_SessionId.get();
52
53
  let sessionId = ModuleFE_RoutingV2.getQueryParameter(QueryParam_SessionId);
53
- if (sessionId)
54
- ModuleFE_RoutingV2.removeQueryParam(QueryParam_SessionId);
55
- else
56
- sessionId = this.StorageKey_SessionId.get();
57
54
  if (sessionId) {
55
+ setTimeout(() => ModuleFE_RoutingV2.removeQueryParam(QueryParam_SessionId), 5000);
58
56
  this.StorageKey_SessionId.set(sessionId);
59
- this.onSessionUpdated(sessionId);
57
+ if (sessionId === prevSessionId)
58
+ this.onSessionUpdated(sessionId)
59
+ .then(() => console.log('on session updated'))
60
+ .catch(err => console.error('Error on session updated', err));
61
+ return;
60
62
  }
63
+ if (!prevSessionId)
64
+ return;
65
+ this.isSessionValid().then((sessionValid) => {
66
+ if (!sessionValid)
67
+ return this.StorageKey_SessionId.delete();
68
+ this.onSessionUpdated(prevSessionId)
69
+ .then(() => console.log('on session updated'))
70
+ .catch(err => console.error('Error on session updated', err));
71
+ });
61
72
  }
62
73
  setSessionKey(sessionKey) {
63
74
  this.sessionKey = sessionKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/user-account-frontend",
3
- "version": "0.401.0",
3
+ "version": "0.401.2",
4
4
  "description": "User Account Frontend",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -34,15 +34,15 @@
34
34
  "test": "ts-mocha -w -p src/test/tsconfig.json --timeout 0 --inspect=8107 --watch-files 'src/test/**/*.test.ts' src/test/**/*.test.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@nu-art/user-account-shared": "0.401.0",
38
- "@nu-art/firebase-frontend": "0.401.0",
39
- "@nu-art/firebase-shared": "0.401.0",
40
- "@nu-art/slack-frontend": "0.401.0",
41
- "@nu-art/slack-shared": "0.401.0",
42
- "@nu-art/thunderstorm-frontend": "0.401.0",
43
- "@nu-art/thunderstorm-shared": "0.401.0",
44
- "@nu-art/ts-common": "0.401.0",
45
- "@nu-art/ts-styles": "0.401.0",
37
+ "@nu-art/user-account-shared": "0.401.2",
38
+ "@nu-art/firebase-frontend": "0.401.2",
39
+ "@nu-art/firebase-shared": "0.401.2",
40
+ "@nu-art/slack-frontend": "0.401.2",
41
+ "@nu-art/slack-shared": "0.401.2",
42
+ "@nu-art/thunderstorm-frontend": "0.401.2",
43
+ "@nu-art/thunderstorm-shared": "0.401.2",
44
+ "@nu-art/ts-common": "0.401.2",
45
+ "@nu-art/ts-styles": "0.401.2",
46
46
  "express": "^4.18.2",
47
47
  "firebase": "^11.9.0",
48
48
  "firebase-admin": "13.4.0",