@frontegg/rest-api 3.0.122 → 3.0.124
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 +11 -1
- package/auth/index.js +6 -0
- package/auth/interfaces.d.ts +16 -5
- package/auth/interfaces.js +1 -0
- package/index.d.ts +2 -2
- package/index.js +3 -3
- package/node/auth/index.js +12 -0
- package/node/auth/interfaces.js +1 -0
- package/node/index.js +29 -25
- package/package.json +1 -1
package/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./secutiry-poilicy";
|
|
2
2
|
export * from "./enums";
|
|
3
3
|
import { ISamlRolesGroup } from "../teams/interfaces";
|
|
4
|
-
import { IAcceptInvitation, IActivateAccount, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3 } from './interfaces';
|
|
4
|
+
import { IAcceptInvitation, IActivateAccount, IAllowedToRememberMfaDevice, ICreateSamlGroup, IDeleteApiToken, IDisableMfa, IEnrollMfaResponse, IForgotPassword, IGetActivateAccountStrategy, IGetActivateAccountStrategyResponse, IGetUserById, IGetUserPasswordConfig, ILogin, ILoginResponse, ILoginViaSocialLogin, ILoginViaSocialLoginResponse, ILoginWithMfa, IOidcPostLogin, IOidcConfiguration, IPostLogin, IPreLogin, IRecoverMFAToken, IResendActivationEmail, IResetPassword, ISamlConfiguration, ISamlVendorConfigResponse, ISignUpResponse, ISignUpUser, ISocialLoginProviderConfiguration, ITenantApiTokensData, IUpdateSamlConfiguration, IUpdateSamlGroup, IUpdateSamlRoles, IUpdateSamlVendorMetadata, IUpdateTenantApiTokensData, IUpdateUserApiTokensData, IUserApiTokensData, IUserIdResponse, IVendorConfig, IVerifyMfa, IVerifyMfaResponse, TestConfig, ISSOPublicConfiguration, IPreLoginWithIdpTypeResponse, IPasswordlessPreLogin, IPasswordlessPostLogin, ICreateSSODomain, IVerifyInviteToken, ISSODomain, ISSOConfigurationDefaultRoles, ISSOConfiguration, IUpdateSSOConfiguration, IOidcPostLoginV2, IExchangeOAuthTokens, IOAuthTokenResponse, ISocialLoginProviderConfigurationV2, ILoginResponseV2, IResetPhoneNumber, IVerifyResetPhoneNumber, IChangePhoneNumber, IVerifyResetPhoneNumberResponse, IResetPhoneNumberResponse, IWebAuthnPreLogin, IWebAuthnPostLogin, IVerifyNewWebAuthnDevice, IWebAuthnPreLoginResponse, ICreateNewDeviceSessionResponse, IAuthStrategiesConfig, ISessionResponse, IChangePhoneNumberWithVerification, IChangePhoneNumberWithVerificationResponse, IVerifyChangePhoneNumber, ISessionConfigurations, IResendInvitationEmail, IPreEnrollMFA, IEnrollMFAAuthenticatorApp, IPreEnrollMFASMS, IEnrollMFASMS, IEnrollMFAWebAuthn, IPreEnrollMFAAuthenticatorAppResponse, IPreEnrollMFAWebAuthnResponse, IVerifyMFAAuthenticatorApp, IPreVerifyMFA, IPreVerifyMFASMSResponse, IVerifyMFASMS, IPreVerifyMFAWebAuthnResponse, IVerifyMFAWebAuthn, IPreEnrollMFASMSResponse, IPreDisableMFASMSResponse, IDisableMFASMS, IDisableMFAWebAuthn, IPreDisableMFAWebAuthnResponse, UserMFADevicesResponse, WithoutMFAToken, IMFAStrategiesResponse, IOAuthLogout, IGetUserAccessTokens, IGetTenantAccessTokens, IDeleteAccessToken, ICreateTenantAccessTokenData, ICreateUserAccessTokenData, IWebAuthnDevices, ICustomSocialLoginProviderConfigurationV1, ILoginResponseV3, IPreVerifyMFAEmailCodeResponse, IVerifyMFAEmailCode } from './interfaces';
|
|
5
5
|
/*****************************************
|
|
6
6
|
* Authentication
|
|
7
7
|
*****************************************/
|
|
@@ -244,6 +244,16 @@ export declare function enrollMFAAuthenticatorAppForLogin(body: IEnrollMFAAuthen
|
|
|
244
244
|
* with the selected authenticator app id, mfaToken and the generated code from your authenticator app.
|
|
245
245
|
*/
|
|
246
246
|
export declare function verifyMFAAuthenticatorAppForLogin(deviceId: string, body: IVerifyMFAAuthenticatorApp): Promise<ILoginResponse>;
|
|
247
|
+
/**
|
|
248
|
+
* pre verify Multi-Factor Email Code
|
|
249
|
+
* the server returns otcToken that should be sent to the verify function with the code that was sent to
|
|
250
|
+
*/
|
|
251
|
+
export declare function preVerifyMFAEmailCode(body: IPreVerifyMFA): Promise<IPreVerifyMFAEmailCodeResponse>;
|
|
252
|
+
/**
|
|
253
|
+
* after pre verify with Email Code, verify Email Code function should be called
|
|
254
|
+
* with the otcToken and the code that has been sent to the email
|
|
255
|
+
*/
|
|
256
|
+
export declare function verifyMFAEmailCode(body: IVerifyMFAEmailCode): Promise<ILoginResponse>;
|
|
247
257
|
/**
|
|
248
258
|
* pre enroll Multi-Factor to use with SMS
|
|
249
259
|
* the server returns otcToken that should be sent to the enroll function with the code that was sent to
|
package/auth/index.js
CHANGED
|
@@ -207,6 +207,12 @@ export async function enrollMFAAuthenticatorAppForLogin(body) {
|
|
|
207
207
|
export async function verifyMFAAuthenticatorAppForLogin(deviceId, body) {
|
|
208
208
|
return Post(`${urls.identity.auth.v1}/user/mfa/authenticator/${deviceId}/verify`, body);
|
|
209
209
|
}
|
|
210
|
+
export async function preVerifyMFAEmailCode(body) {
|
|
211
|
+
return Post(`${urls.identity.auth.v1}/user/mfa/emailcode`, body);
|
|
212
|
+
}
|
|
213
|
+
export async function verifyMFAEmailCode(body) {
|
|
214
|
+
return Post(`${urls.identity.users.v1}/user/mfa/emailcode/verify`, body);
|
|
215
|
+
}
|
|
210
216
|
export async function preEnrollMFASMSForLogin(body) {
|
|
211
217
|
return Post(`${urls.identity.auth.v1}/user/mfa/sms/enroll`, body);
|
|
212
218
|
}
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -43,6 +43,7 @@ export declare type ILoginResponse = IUserProfile & {
|
|
|
43
43
|
userEmail?: string;
|
|
44
44
|
mfaStrategies?: MFAStrategyEnum[];
|
|
45
45
|
mfaDevices?: UserMFADevicesResponse;
|
|
46
|
+
isBreachedPassword?: boolean;
|
|
46
47
|
};
|
|
47
48
|
export declare type ILoginResponseV2 = {
|
|
48
49
|
user: ILoginResponse;
|
|
@@ -569,16 +570,25 @@ export interface IVerifyMFA {
|
|
|
569
570
|
mfaToken: string;
|
|
570
571
|
rememberDevice?: boolean;
|
|
571
572
|
}
|
|
573
|
+
export interface IPreVerifyCode {
|
|
574
|
+
otcToken: string;
|
|
575
|
+
}
|
|
576
|
+
export interface IVerifyCode extends IVerifyMFA {
|
|
577
|
+
otcToken: string;
|
|
578
|
+
code: string;
|
|
579
|
+
}
|
|
572
580
|
export interface IVerifyMFAAuthenticatorApp extends IVerifyMFA {
|
|
573
581
|
value: string;
|
|
574
582
|
}
|
|
575
|
-
export interface IPreVerifyMFASMSResponse {
|
|
576
|
-
otcToken: string;
|
|
583
|
+
export interface IPreVerifyMFASMSResponse extends IPreVerifyCode {
|
|
577
584
|
phoneNumber: string;
|
|
578
585
|
}
|
|
579
|
-
export interface IVerifyMFASMS extends
|
|
586
|
+
export interface IVerifyMFASMS extends IVerifyCode {
|
|
587
|
+
}
|
|
588
|
+
export interface IPreVerifyMFAEmailCodeResponse {
|
|
580
589
|
otcToken: string;
|
|
581
|
-
|
|
590
|
+
}
|
|
591
|
+
export interface IVerifyMFAEmailCode extends IVerifyCode {
|
|
582
592
|
}
|
|
583
593
|
export interface IPreVerifyMFAWebAuthnResponse {
|
|
584
594
|
webauthnToken: string;
|
|
@@ -592,7 +602,8 @@ export declare enum MFAStrategyEnum {
|
|
|
592
602
|
AuthenticatorApp = "AuthenticatorApp",
|
|
593
603
|
WebAuthnPlatform = "WebAuthnPlatform",
|
|
594
604
|
WebAuthnCrossPlatform = "WebAuthnCrossPlatform",
|
|
595
|
-
SMS = "SMS"
|
|
605
|
+
SMS = "SMS",
|
|
606
|
+
EmailCode = "EmailCode"
|
|
596
607
|
}
|
|
597
608
|
export interface UserMFAWebAuthnDevice {
|
|
598
609
|
id: string;
|
package/auth/interfaces.js
CHANGED
|
@@ -22,4 +22,5 @@ export let MFAStrategyEnum;
|
|
|
22
22
|
MFAStrategyEnum["WebAuthnPlatform"] = "WebAuthnPlatform";
|
|
23
23
|
MFAStrategyEnum["WebAuthnCrossPlatform"] = "WebAuthnCrossPlatform";
|
|
24
24
|
MFAStrategyEnum["SMS"] = "SMS";
|
|
25
|
+
MFAStrategyEnum["EmailCode"] = "EmailCode";
|
|
25
26
|
})(MFAStrategyEnum || (MFAStrategyEnum = {}));
|
package/index.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ export * from "./subscriptions/interfaces";
|
|
|
37
37
|
export * from "./vendor/interfaces";
|
|
38
38
|
export * from "./sub-tenants/interfaces";
|
|
39
39
|
export * from "./routers";
|
|
40
|
-
export * from "./feature-flags";
|
|
40
|
+
export * from "./feature-flags/index";
|
|
41
41
|
export * from "./feature-flags/interfaces";
|
|
42
|
-
export * from "./directory";
|
|
42
|
+
export * from "./directory/index";
|
|
43
43
|
export * from "./directory/interfaces";
|
|
44
44
|
export * from "./impersonate/interfaces";
|
|
45
45
|
export * from "./groups/interfaces";
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.124
|
|
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.
|
|
@@ -42,9 +42,9 @@ export * from "./subscriptions/interfaces";
|
|
|
42
42
|
export * from "./vendor/interfaces";
|
|
43
43
|
export * from "./sub-tenants/interfaces";
|
|
44
44
|
export * from "./routers";
|
|
45
|
-
export * from "./feature-flags";
|
|
45
|
+
export * from "./feature-flags/index";
|
|
46
46
|
export * from "./feature-flags/interfaces";
|
|
47
|
-
export * from "./directory";
|
|
47
|
+
export * from "./directory/index";
|
|
48
48
|
export * from "./directory/interfaces";
|
|
49
49
|
export * from "./impersonate/interfaces";
|
|
50
50
|
export * from "./groups/interfaces";
|
package/node/auth/index.js
CHANGED
|
@@ -48,6 +48,8 @@ var _exportNames = {
|
|
|
48
48
|
preEnrollMFAAuthenticatorAppForLogin: true,
|
|
49
49
|
enrollMFAAuthenticatorAppForLogin: true,
|
|
50
50
|
verifyMFAAuthenticatorAppForLogin: true,
|
|
51
|
+
preVerifyMFAEmailCode: true,
|
|
52
|
+
verifyMFAEmailCode: true,
|
|
51
53
|
preEnrollMFASMSForLogin: true,
|
|
52
54
|
enrollMFASMSForLogin: true,
|
|
53
55
|
preVerifyMFASMSForLogin: true,
|
|
@@ -221,6 +223,7 @@ exports.preEnrollMFAWebAuthnForLogin = preEnrollMFAWebAuthnForLogin;
|
|
|
221
223
|
exports.preLogin = preLogin;
|
|
222
224
|
exports.preLoginV2 = preLoginV2;
|
|
223
225
|
exports.preLoginWithIdpType = preLoginWithIdpType;
|
|
226
|
+
exports.preVerifyMFAEmailCode = preVerifyMFAEmailCode;
|
|
224
227
|
exports.preVerifyMFASMSForLogin = preVerifyMFASMSForLogin;
|
|
225
228
|
exports.preVerifyMFAWebAuthnForLogin = preVerifyMFAWebAuthnForLogin;
|
|
226
229
|
exports.recoverMfaToken = recoverMfaToken;
|
|
@@ -249,6 +252,7 @@ exports.validateSamlDomain = validateSamlDomain;
|
|
|
249
252
|
exports.verifyChangePhoneNumber = verifyChangePhoneNumber;
|
|
250
253
|
exports.verifyInviteToken = verifyInviteToken;
|
|
251
254
|
exports.verifyMFAAuthenticatorAppForLogin = verifyMFAAuthenticatorAppForLogin;
|
|
255
|
+
exports.verifyMFAEmailCode = verifyMFAEmailCode;
|
|
252
256
|
exports.verifyMFASMSForLogin = verifyMFASMSForLogin;
|
|
253
257
|
exports.verifyMFAWebAuthnForLogin = verifyMFAWebAuthnForLogin;
|
|
254
258
|
exports.verifyMfa = verifyMfa;
|
|
@@ -548,6 +552,14 @@ async function verifyMFAAuthenticatorAppForLogin(deviceId, body) {
|
|
|
548
552
|
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/authenticator/${deviceId}/verify`, body);
|
|
549
553
|
}
|
|
550
554
|
|
|
555
|
+
async function preVerifyMFAEmailCode(body) {
|
|
556
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/emailcode`, body);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
async function verifyMFAEmailCode(body) {
|
|
560
|
+
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/user/mfa/emailcode/verify`, body);
|
|
561
|
+
}
|
|
562
|
+
|
|
551
563
|
async function preEnrollMFASMSForLogin(body) {
|
|
552
564
|
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/user/mfa/sms/enroll`, body);
|
|
553
565
|
}
|
package/node/auth/interfaces.js
CHANGED
|
@@ -49,4 +49,5 @@ exports.MFAStrategyEnum = MFAStrategyEnum;
|
|
|
49
49
|
MFAStrategyEnum["WebAuthnPlatform"] = "WebAuthnPlatform";
|
|
50
50
|
MFAStrategyEnum["WebAuthnCrossPlatform"] = "WebAuthnCrossPlatform";
|
|
51
51
|
MFAStrategyEnum["SMS"] = "SMS";
|
|
52
|
+
MFAStrategyEnum["EmailCode"] = "EmailCode";
|
|
52
53
|
})(MFAStrategyEnum || (exports.MFAStrategyEnum = MFAStrategyEnum = {}));
|
package/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license Frontegg v3.0.
|
|
1
|
+
/** @license Frontegg v3.0.124
|
|
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.
|
|
@@ -118,32 +118,8 @@ var subTenants = _interopRequireWildcard(require("./sub-tenants"));
|
|
|
118
118
|
|
|
119
119
|
var featureFlags = _interopRequireWildcard(require("./feature-flags"));
|
|
120
120
|
|
|
121
|
-
Object.keys(featureFlags).forEach(function (key) {
|
|
122
|
-
if (key === "default" || key === "__esModule") return;
|
|
123
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
124
|
-
if (key in exports && exports[key] === featureFlags[key]) return;
|
|
125
|
-
Object.defineProperty(exports, key, {
|
|
126
|
-
enumerable: true,
|
|
127
|
-
get: function () {
|
|
128
|
-
return featureFlags[key];
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
|
|
133
121
|
var directory = _interopRequireWildcard(require("./directory"));
|
|
134
122
|
|
|
135
|
-
Object.keys(directory).forEach(function (key) {
|
|
136
|
-
if (key === "default" || key === "__esModule") return;
|
|
137
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
138
|
-
if (key in exports && exports[key] === directory[key]) return;
|
|
139
|
-
Object.defineProperty(exports, key, {
|
|
140
|
-
enumerable: true,
|
|
141
|
-
get: function () {
|
|
142
|
-
return directory[key];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
|
|
147
123
|
var impersonate = _interopRequireWildcard(require("./impersonate"));
|
|
148
124
|
|
|
149
125
|
var groups = _interopRequireWildcard(require("./groups"));
|
|
@@ -364,6 +340,20 @@ Object.keys(_routers).forEach(function (key) {
|
|
|
364
340
|
});
|
|
365
341
|
});
|
|
366
342
|
|
|
343
|
+
var _index = require("./feature-flags/index");
|
|
344
|
+
|
|
345
|
+
Object.keys(_index).forEach(function (key) {
|
|
346
|
+
if (key === "default" || key === "__esModule") return;
|
|
347
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
348
|
+
if (key in exports && exports[key] === _index[key]) return;
|
|
349
|
+
Object.defineProperty(exports, key, {
|
|
350
|
+
enumerable: true,
|
|
351
|
+
get: function () {
|
|
352
|
+
return _index[key];
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
|
|
367
357
|
var _interfaces15 = require("./feature-flags/interfaces");
|
|
368
358
|
|
|
369
359
|
Object.keys(_interfaces15).forEach(function (key) {
|
|
@@ -378,6 +368,20 @@ Object.keys(_interfaces15).forEach(function (key) {
|
|
|
378
368
|
});
|
|
379
369
|
});
|
|
380
370
|
|
|
371
|
+
var _index2 = require("./directory/index");
|
|
372
|
+
|
|
373
|
+
Object.keys(_index2).forEach(function (key) {
|
|
374
|
+
if (key === "default" || key === "__esModule") return;
|
|
375
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
376
|
+
if (key in exports && exports[key] === _index2[key]) return;
|
|
377
|
+
Object.defineProperty(exports, key, {
|
|
378
|
+
enumerable: true,
|
|
379
|
+
get: function () {
|
|
380
|
+
return _index2[key];
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
|
|
381
385
|
var _interfaces16 = require("./directory/interfaces");
|
|
382
386
|
|
|
383
387
|
Object.keys(_interfaces16).forEach(function (key) {
|