@frontegg/rest-api 3.1.38 → 3.1.39
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/auth/index.js +2 -4
- package/index.js +1 -1
- package/node/auth/index.js +1 -5
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.js
CHANGED
|
@@ -12,11 +12,10 @@ import { ContextHolder } from "../ContextHolder";
|
|
|
12
12
|
import { Delete, Get, Patch, Post, Put } from "../fetch";
|
|
13
13
|
import { jwtDecode } from "../jwt";
|
|
14
14
|
import { LOAD_AUTHORIZATION_FF } from './interfaces';
|
|
15
|
-
import { loadEntitlements
|
|
15
|
+
import { loadEntitlements } from '../entitlements';
|
|
16
16
|
import { ADMIN_PORTAL_ENTITLEMENTS_FF } from '../entitlements/interfaces';
|
|
17
17
|
import { FeatureFlags } from "../feature-flags";
|
|
18
18
|
import { executeConditionalPromise, getCurrentUserTenantsFunction, getTabTenantFromSessionStorage, setTabTenantInSessionStorage } from "./utils";
|
|
19
|
-
import { USE_ENTITLEMENTS_V2_ENDPOINT_FF } from "./constants";
|
|
20
19
|
export async function generateLoginResponse(loginResponse) {
|
|
21
20
|
if (!loginResponse.accessToken) {
|
|
22
21
|
return loginResponse;
|
|
@@ -725,12 +724,11 @@ export async function getMeV2() {
|
|
|
725
724
|
return Get(`${urls.identity.users.v2}/me`);
|
|
726
725
|
}
|
|
727
726
|
export async function getMeAndEntitlements() {
|
|
728
|
-
const [useEntitlementsV2] = FeatureFlags.getFeatureFlags([USE_ENTITLEMENTS_V2_ENDPOINT_FF], ContextHolder.getAppName() || '');
|
|
729
727
|
const actions = [{
|
|
730
728
|
action: getMeV2,
|
|
731
729
|
shouldLoad: true
|
|
732
730
|
}, {
|
|
733
|
-
action:
|
|
731
|
+
action: loadEntitlements,
|
|
734
732
|
shouldLoad: shouldLoadEntitlements()
|
|
735
733
|
}, {
|
|
736
734
|
action: getUserAuthorization,
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -377,8 +377,6 @@ var _interfaces2 = require("../entitlements/interfaces");
|
|
|
377
377
|
|
|
378
378
|
var _featureFlags = require("../feature-flags");
|
|
379
379
|
|
|
380
|
-
var _constants2 = require("./constants");
|
|
381
|
-
|
|
382
380
|
const _excluded = ["type"],
|
|
383
381
|
_excluded2 = ["type"],
|
|
384
382
|
_excluded3 = ["type"];
|
|
@@ -1241,13 +1239,11 @@ async function getMeV2() {
|
|
|
1241
1239
|
}
|
|
1242
1240
|
|
|
1243
1241
|
async function getMeAndEntitlements() {
|
|
1244
|
-
const [useEntitlementsV2] = _featureFlags.FeatureFlags.getFeatureFlags([_constants2.USE_ENTITLEMENTS_V2_ENDPOINT_FF], _ContextHolder.ContextHolder.getAppName() || '');
|
|
1245
|
-
|
|
1246
1242
|
const actions = [{
|
|
1247
1243
|
action: getMeV2,
|
|
1248
1244
|
shouldLoad: true
|
|
1249
1245
|
}, {
|
|
1250
|
-
action:
|
|
1246
|
+
action: _entitlements.loadEntitlements,
|
|
1251
1247
|
shouldLoad: shouldLoadEntitlements()
|
|
1252
1248
|
}, {
|
|
1253
1249
|
action: getUserAuthorization,
|
package/node/index.js
CHANGED