@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 +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
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
|
}
|