@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 +2 -1
- package/auth/index.js +7 -1
- package/auth/interfaces.d.ts +3 -0
- package/index.js +1 -1
- package/node/auth/index.js +7 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
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
|
-
|
|
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
|
}
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -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
package/node/auth/index.js
CHANGED
|
@@ -1269,5 +1269,11 @@ async function getMeAndEntitlements() {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
async function generateStepupSession(body) {
|
|
1272
|
-
|
|
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