@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 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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.137
1
+ /** @license Frontegg v3.0.138
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -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
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.137
1
+ /** @license Frontegg v3.0.138
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/rest-api",
3
- "version": "3.0.137",
3
+ "version": "3.0.138",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {