@frontegg/rest-api 3.0.53 → 3.0.55
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/enums.d.ts +2 -1
- package/auth/enums.js +1 -0
- package/auth/index.d.ts +5 -1
- package/auth/index.js +3 -0
- package/auth/interfaces.d.ts +6 -0
- package/index.js +1 -1
- package/node/auth/enums.js +1 -0
- package/node/auth/index.js +6 -0
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/enums.d.ts
CHANGED
package/auth/enums.js
CHANGED
|
@@ -7,6 +7,7 @@ export let SocialLoginProviders;
|
|
|
7
7
|
SocialLoginProviders["Github"] = "github";
|
|
8
8
|
SocialLoginProviders["Slack"] = "slack";
|
|
9
9
|
SocialLoginProviders["Apple"] = "apple";
|
|
10
|
+
SocialLoginProviders["Linkedin"] = "linkedin";
|
|
10
11
|
})(SocialLoginProviders || (SocialLoginProviders = {}));
|
|
11
12
|
|
|
12
13
|
export let AuthStrategyEnum;
|
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 } 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 } from "./interfaces";
|
|
5
5
|
/*****************************************
|
|
6
6
|
* Authentication
|
|
7
7
|
*****************************************/
|
|
@@ -94,6 +94,10 @@ export declare function refreshTokenV2(): Promise<ILoginResponseV2>;
|
|
|
94
94
|
* logout from server, invalidate access and refresh token, remove it from cookies.
|
|
95
95
|
*/
|
|
96
96
|
export declare function logout(): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* logout from server on Hosted Login, invalidate access and refresh token, remove it from cookies.
|
|
99
|
+
*/
|
|
100
|
+
export declare function OAuthLogout(params?: IOAuthLogout): Promise<void>;
|
|
97
101
|
/**
|
|
98
102
|
* calling forgot password request will send email with link to reset user's password.
|
|
99
103
|
*
|
package/auth/index.js
CHANGED
|
@@ -113,6 +113,9 @@ export async function refreshTokenV2() {
|
|
|
113
113
|
export async function logout() {
|
|
114
114
|
return Post(`${urls.identity.auth.v1}/logout`);
|
|
115
115
|
}
|
|
116
|
+
export async function OAuthLogout(params) {
|
|
117
|
+
return Get(`${urls.oauth.v1}/logout`, params);
|
|
118
|
+
}
|
|
116
119
|
export async function forgotPassword(body) {
|
|
117
120
|
return Post(`${urls.identity.users.v1}/passwords/reset`, body);
|
|
118
121
|
}
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -333,6 +333,7 @@ export interface ISSOConfiguration {
|
|
|
333
333
|
domains: ISSODomain[];
|
|
334
334
|
roleIds: string[];
|
|
335
335
|
groups: ISamlRolesGroup[];
|
|
336
|
+
skipEmailDomainValidation: boolean;
|
|
336
337
|
}
|
|
337
338
|
export interface IExchangeOAuthTokens {
|
|
338
339
|
code?: string;
|
|
@@ -346,6 +347,11 @@ export interface IOAuthTokenResponse {
|
|
|
346
347
|
id_token: string;
|
|
347
348
|
refresh_token: string;
|
|
348
349
|
}
|
|
350
|
+
export interface IOAuthLogout {
|
|
351
|
+
id_token_hint?: string;
|
|
352
|
+
post_logout_redirect_uri?: string;
|
|
353
|
+
state?: string;
|
|
354
|
+
}
|
|
349
355
|
export declare type IUpdateSSOConfiguration = Partial<Omit<ISSOConfiguration, "id" | "createdAt" | "updatedAt" | "domains">>;
|
|
350
356
|
export interface IResetPhoneNumber {
|
|
351
357
|
email: string;
|
package/index.js
CHANGED
package/node/auth/enums.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.SocialLoginProviders = SocialLoginProviders;
|
|
|
14
14
|
SocialLoginProviders["Github"] = "github";
|
|
15
15
|
SocialLoginProviders["Slack"] = "slack";
|
|
16
16
|
SocialLoginProviders["Apple"] = "apple";
|
|
17
|
+
SocialLoginProviders["Linkedin"] = "linkedin";
|
|
17
18
|
})(SocialLoginProviders || (exports.SocialLoginProviders = SocialLoginProviders = {}));
|
|
18
19
|
|
|
19
20
|
let AuthStrategyEnum;
|
package/node/auth/index.js
CHANGED
|
@@ -23,6 +23,7 @@ var _exportNames = {
|
|
|
23
23
|
refreshToken: true,
|
|
24
24
|
refreshTokenV2: true,
|
|
25
25
|
logout: true,
|
|
26
|
+
OAuthLogout: true,
|
|
26
27
|
forgotPassword: true,
|
|
27
28
|
resetPassword: true,
|
|
28
29
|
loadPasswordConfig: true,
|
|
@@ -120,6 +121,7 @@ var _exportNames = {
|
|
|
120
121
|
getVendorPublicAuthStrategiesConfig: true,
|
|
121
122
|
getMFAStrategiesConfig: true
|
|
122
123
|
};
|
|
124
|
+
exports.OAuthLogout = OAuthLogout;
|
|
123
125
|
exports.acceptInvitation = acceptInvitation;
|
|
124
126
|
exports.activateAccount = activateAccount;
|
|
125
127
|
exports.changePhoneNumber = changePhoneNumber;
|
|
@@ -403,6 +405,10 @@ async function logout() {
|
|
|
403
405
|
return (0, _fetch.Post)(`${_constants.urls.identity.auth.v1}/logout`);
|
|
404
406
|
}
|
|
405
407
|
|
|
408
|
+
async function OAuthLogout(params) {
|
|
409
|
+
return (0, _fetch.Get)(`${_constants.urls.oauth.v1}/logout`, params);
|
|
410
|
+
}
|
|
411
|
+
|
|
406
412
|
async function forgotPassword(body) {
|
|
407
413
|
return (0, _fetch.Post)(`${_constants.urls.identity.users.v1}/passwords/reset`, body);
|
|
408
414
|
}
|
package/node/index.js
CHANGED