@frontegg/rest-api 3.1.48 → 3.1.49

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.d.ts CHANGED
@@ -763,5 +763,6 @@ export declare function getMeV2(): Promise<IUserProfile>;
763
763
  export declare function getMeAndEntitlements(): Promise<IUserProfile>;
764
764
  /**
765
765
  * generate step-up session
766
+ * this request returns the step up details to continue step up, or the generated login response when stepped up jwt received from the BE
766
767
  */
767
- export declare function generateStepupSession(body: GenerateStepUpRequest): Promise<GenerateStepUpResponse>;
768
+ export declare function generateStepupSession(body: GenerateStepUpRequest): Promise<GenerateStepUpResponse | ILoginResponseV3>;
package/auth/index.js CHANGED
@@ -749,5 +749,11 @@ export async function getMeAndEntitlements() {
749
749
  });
750
750
  }
751
751
  export async function generateStepupSession(body) {
752
- return Post(`${urls.identity.auth.v1}/user/step-up/generate`, body);
752
+ const data = await Post(`${urls.identity.auth.v1}/user/step-up/generate`, body);
753
+
754
+ if (!data.accessToken) {
755
+ return data;
756
+ }
757
+
758
+ return generateLoginResponseV3(data);
753
759
  }
@@ -48,6 +48,9 @@ export declare type ILoginResponse = IUserProfile & {
48
48
  mfaDevices?: UserMFADevicesResponse;
49
49
  isBreachedPassword?: boolean;
50
50
  entitlements?: UserEntitlementsResponse | UserEntitlementsResponseV2;
51
+ amr?: string[];
52
+ acr?: string;
53
+ auth_time?: number;
51
54
  };
52
55
  export declare type ILoginResponseV2 = {
53
56
  user: ILoginResponse;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.48
1
+ /** @license Frontegg v3.1.49
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.
@@ -1269,5 +1269,11 @@ async function getMeAndEntitlements() {
1269
1269
  }
1270
1270
 
1271
1271
  async function generateStepupSession(body) {
1272
- return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/step-up/generate`, body);
1272
+ const data = await (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/step-up/generate`, body);
1273
+
1274
+ if (!data.accessToken) {
1275
+ return data;
1276
+ }
1277
+
1278
+ return generateLoginResponseV3(data);
1273
1279
  }
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.1.48
1
+ /** @license Frontegg v3.1.49
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.1.48",
3
+ "version": "3.1.49",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {