@geexcode/geex-angular 0.0.18 → 0.0.19

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 CHANGED
@@ -107,6 +107,9 @@ function createAuthModule(injector) {
107
107
  async loadUserData() {
108
108
  const oAuthService = injector.get(import_angular_oauth2_oidc.OAuthService);
109
109
  try {
110
+ if (!oAuthService.hasValidIdToken()) {
111
+ return void 0;
112
+ }
110
113
  await oAuthService.loadUserProfile();
111
114
  const profile = oAuthService.getIdentityClaims();
112
115
  if (profile && oAuthService.hasValidAccessToken()) {
@@ -121,7 +124,6 @@ function createAuthModule(injector) {
121
124
  }
122
125
  } catch (err) {
123
126
  console.error(err);
124
- oAuthService.logOut();
125
127
  }
126
128
  return void 0;
127
129
  }
package/dist/index.mjs CHANGED
@@ -62,6 +62,9 @@ function createAuthModule(injector) {
62
62
  async loadUserData() {
63
63
  const oAuthService = injector.get(OAuthService);
64
64
  try {
65
+ if (!oAuthService.hasValidIdToken()) {
66
+ return void 0;
67
+ }
65
68
  await oAuthService.loadUserProfile();
66
69
  const profile = oAuthService.getIdentityClaims();
67
70
  if (profile && oAuthService.hasValidAccessToken()) {
@@ -76,7 +79,6 @@ function createAuthModule(injector) {
76
79
  }
77
80
  } catch (err) {
78
81
  console.error(err);
79
- oAuthService.logOut();
80
82
  }
81
83
  return void 0;
82
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geexcode/geex-angular",
3
- "version": "0.0.18",
3
+ "version": "0.0.19",
4
4
  "description": "Angular adapter for Geex core.",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs",