@frontegg/rest-api 3.0.137 → 3.0.138
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 +8 -1
- package/index.js +1 -1
- package/node/auth/index.js +8 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/index.js
CHANGED
|
@@ -118,10 +118,17 @@ export async function generateLoginResponseFromOAuthResponseV2(oauthResponse) {
|
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
ContextHolder.setUser(user);
|
|
121
|
+
let entitlements;
|
|
122
|
+
|
|
123
|
+
if (await shouldLoadEntitlements()) {
|
|
124
|
+
entitlements = await loadEntitlements();
|
|
125
|
+
}
|
|
126
|
+
|
|
121
127
|
return {
|
|
122
128
|
user,
|
|
123
129
|
tenants: currentUserTenants.tenants,
|
|
124
|
-
activeTenant: currentUserTenants.activeTenant
|
|
130
|
+
activeTenant: currentUserTenants.activeTenant,
|
|
131
|
+
entitlements
|
|
125
132
|
};
|
|
126
133
|
}
|
|
127
134
|
export async function preLogin(body) {
|
package/index.js
CHANGED
package/node/auth/index.js
CHANGED
|
@@ -460,10 +460,17 @@ async function generateLoginResponseFromOAuthResponseV2(oauthResponse) {
|
|
|
460
460
|
|
|
461
461
|
_ContextHolder.ContextHolder.setUser(user);
|
|
462
462
|
|
|
463
|
+
let entitlements;
|
|
464
|
+
|
|
465
|
+
if (await shouldLoadEntitlements()) {
|
|
466
|
+
entitlements = await (0, _entitlements.loadEntitlements)();
|
|
467
|
+
}
|
|
468
|
+
|
|
463
469
|
return {
|
|
464
470
|
user,
|
|
465
471
|
tenants: currentUserTenants.tenants,
|
|
466
|
-
activeTenant: currentUserTenants.activeTenant
|
|
472
|
+
activeTenant: currentUserTenants.activeTenant,
|
|
473
|
+
entitlements
|
|
467
474
|
};
|
|
468
475
|
}
|
|
469
476
|
|
package/node/index.js
CHANGED