@frontegg/rest-api 3.0.85 → 3.0.87

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
@@ -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 } 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 } from './interfaces';
5
5
  /*****************************************
6
6
  * Authentication
7
7
  *****************************************/
@@ -367,6 +367,11 @@ export declare function getSocialLoginProviders(): Promise<ISocialLoginProviderC
367
367
  * @return array of providers configurations
368
368
  */
369
369
  export declare function getSocialLoginProvidersV2(): Promise<ISocialLoginProviderConfigurationV2[]>;
370
+ /**
371
+ * Get social logins custom providers configurations
372
+ * @return array of custom providers configurations
373
+ */
374
+ export declare function getCustomSocialLoginProvidersV1(): Promise<ICustomSocialLoginProviderConfigurationV1>;
370
375
  /**
371
376
  * Login using social login
372
377
  * @return cookie with refresh token
package/auth/index.js CHANGED
@@ -270,6 +270,9 @@ export async function getSocialLoginProviders() {
270
270
  export async function getSocialLoginProvidersV2() {
271
271
  return Get(urls.identity.sso.v2);
272
272
  }
273
+ export async function getCustomSocialLoginProvidersV1() {
274
+ return Get(urls.identity.sso.custom.v1);
275
+ }
273
276
  export async function loginViaSocialLogin({
274
277
  provider,
275
278
  code,
@@ -149,6 +149,21 @@ export interface ISocialLoginProviderConfigurationV2 {
149
149
  options?: Record<string, unknown>;
150
150
  customised: boolean;
151
151
  }
152
+ export interface ICustomSocialLoginProviderConfigurationV1 {
153
+ providers: {
154
+ id: string;
155
+ type: string;
156
+ clientId: string;
157
+ redirectUrl: string;
158
+ redirectUrlPattern: string;
159
+ authorizationUrl: string;
160
+ userInfoUrl: string;
161
+ scopes: string;
162
+ ssoLogoUrl: string | null;
163
+ displayName: string;
164
+ active: boolean;
165
+ }[];
166
+ }
152
167
  export interface ILoginViaSocialLogin {
153
168
  code?: string;
154
169
  idToken?: string;
@@ -490,8 +505,12 @@ export interface IAuthStrategyConfig {
490
505
  strategy: SecondaryAuthStrategy;
491
506
  isActive: boolean;
492
507
  }
508
+ export interface MainAuthStrategy {
509
+ strategy: AuthStrategyEnum;
510
+ }
493
511
  export interface IAuthStrategiesConfig {
494
512
  secondaryAuthStrategies: IAuthStrategyConfig[];
513
+ mainAuthStrategies: MainAuthStrategy[];
495
514
  }
496
515
  export interface IPreEnrollMFA {
497
516
  mfaToken: string;
package/constants.d.ts CHANGED
@@ -46,6 +46,9 @@ export declare const urls: {
46
46
  sso: {
47
47
  v1: string;
48
48
  v2: string;
49
+ custom: {
50
+ v1: string;
51
+ };
49
52
  };
50
53
  permissions: {
51
54
  v1: string;
package/constants.js CHANGED
@@ -45,7 +45,10 @@ export const urls = {
45
45
  },
46
46
  sso: {
47
47
  v1: '/identity/resources/sso/v1',
48
- v2: '/identity/resources/sso/v2'
48
+ v2: '/identity/resources/sso/v2',
49
+ custom: {
50
+ v1: '/identity/resources/sso/custom/v1'
51
+ }
49
52
  },
50
53
  permissions: {
51
54
  v1: '/identity/resources/permissions/v1'
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.85
1
+ /** @license Frontegg v3.0.87
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.
@@ -69,6 +69,7 @@ var _exportNames = {
69
69
  getSSOPublicConfiguration: true,
70
70
  getSocialLoginProviders: true,
71
71
  getSocialLoginProvidersV2: true,
72
+ getCustomSocialLoginProvidersV1: true,
72
73
  loginViaSocialLogin: true,
73
74
  getVendorConfig: true,
74
75
  signUpUser: true,
@@ -171,6 +172,7 @@ exports.generateLoginResponseV2 = generateLoginResponseV2;
171
172
  exports.getActivateAccountStrategy = getActivateAccountStrategy;
172
173
  exports.getCurrentUserSession = getCurrentUserSession;
173
174
  exports.getCurrentUserSessions = getCurrentUserSessions;
175
+ exports.getCustomSocialLoginProvidersV1 = getCustomSocialLoginProvidersV1;
174
176
  exports.getMFADevices = getMFADevices;
175
177
  exports.getMFAStrategiesConfig = getMFAStrategiesConfig;
176
178
  exports.getOidcConfiguration = getOidcConfiguration;
@@ -622,6 +624,10 @@ async function getSocialLoginProvidersV2() {
622
624
  return (0, _fetch.Get)(_constants.urls.identity.sso.v2);
623
625
  }
624
626
 
627
+ async function getCustomSocialLoginProvidersV1() {
628
+ return (0, _fetch.Get)(_constants.urls.identity.sso.custom.v1);
629
+ }
630
+
625
631
  async function loginViaSocialLogin({
626
632
  provider,
627
633
  code,
package/node/constants.js CHANGED
@@ -51,7 +51,10 @@ const urls = {
51
51
  },
52
52
  sso: {
53
53
  v1: '/identity/resources/sso/v1',
54
- v2: '/identity/resources/sso/v2'
54
+ v2: '/identity/resources/sso/v2',
55
+ custom: {
56
+ v1: '/identity/resources/sso/custom/v1'
57
+ }
55
58
  },
56
59
  permissions: {
57
60
  v1: '/identity/resources/permissions/v1'
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.85
1
+ /** @license Frontegg v3.0.87
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.85",
3
+ "version": "3.0.87",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {