@meistrari/tela-cli 0.7.25 → 0.7.26
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 +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ var require_auth = __commonJS({
|
|
|
153
153
|
return refreshed;
|
|
154
154
|
}
|
|
155
155
|
function createStoredUserSession(tokens, previousCredential = {}) {
|
|
156
|
-
const previousRaw =
|
|
156
|
+
const previousRaw = sanitizeCredentialRaw(previousCredential.raw);
|
|
157
157
|
const user = isPlainObject(tokens.user) ? tokens.user : isPlainObject(previousRaw.user) ? previousRaw.user : null;
|
|
158
158
|
const organization = isPlainObject(tokens.organization) ? tokens.organization : isPlainObject(previousRaw.organization) ? previousRaw.organization : null;
|
|
159
159
|
return {
|
|
@@ -247,6 +247,12 @@ var require_auth = __commonJS({
|
|
|
247
247
|
function refreshSkewDate() {
|
|
248
248
|
return new Date(Date.now() + 60 * 1e3);
|
|
249
249
|
}
|
|
250
|
+
function sanitizeCredentialRaw(raw) {
|
|
251
|
+
if (!isPlainObject(raw))
|
|
252
|
+
return {};
|
|
253
|
+
const { requesterApplicationId: _requesterApplicationId, targetApplicationId: _targetApplicationId, ...safeRaw } = raw;
|
|
254
|
+
return safeRaw;
|
|
255
|
+
}
|
|
250
256
|
}
|
|
251
257
|
});
|
|
252
258
|
|