@frontegg/rest-api 3.0.51 → 3.0.53

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 CHANGED
@@ -3,7 +3,8 @@ export declare enum SocialLoginProviders {
3
3
  Facebook = "facebook",
4
4
  Google = "google",
5
5
  Github = "github",
6
- Slack = "slack"
6
+ Slack = "slack",
7
+ Apple = "apple"
7
8
  }
8
9
  export declare enum AuthStrategyEnum {
9
10
  EmailAndPassword = "EmailAndPassword",
package/auth/enums.js CHANGED
@@ -6,6 +6,7 @@ export let SocialLoginProviders;
6
6
  SocialLoginProviders["Google"] = "google";
7
7
  SocialLoginProviders["Github"] = "github";
8
8
  SocialLoginProviders["Slack"] = "slack";
9
+ SocialLoginProviders["Apple"] = "apple";
9
10
  })(SocialLoginProviders || (SocialLoginProviders = {}));
10
11
 
11
12
  export let AuthStrategyEnum;
package/auth/index.d.ts CHANGED
@@ -367,7 +367,7 @@ export declare function getSocialLoginProvidersV2(): Promise<ISocialLoginProvide
367
367
  * Login using social login
368
368
  * @return cookie with refresh token
369
369
  */
370
- export declare function loginViaSocialLogin({ provider, code, redirectUri, codeVerifier, metadata, invitationToken, state, }: ILoginViaSocialLogin): Promise<ILoginViaSocialLoginResponse>;
370
+ export declare function loginViaSocialLogin({ provider, code, idToken, redirectUri, codeVerifier, metadata, invitationToken, state, }: ILoginViaSocialLogin): Promise<ILoginViaSocialLoginResponse>;
371
371
  /**
372
372
  * Get vendor secure access configuration
373
373
  */
package/auth/index.js CHANGED
@@ -270,15 +270,22 @@ export async function getSocialLoginProvidersV2() {
270
270
  export async function loginViaSocialLogin({
271
271
  provider,
272
272
  code,
273
+ idToken,
273
274
  redirectUri,
274
275
  codeVerifier,
275
276
  metadata,
276
277
  invitationToken,
277
278
  state
278
279
  }) {
279
- const params = {
280
- code
281
- };
280
+ const params = {};
281
+
282
+ if (code) {
283
+ params.code = code;
284
+ }
285
+
286
+ if (idToken) {
287
+ params.id_token = idToken;
288
+ }
282
289
 
283
290
  if (redirectUri) {
284
291
  params.redirectUri = redirectUri;
@@ -148,7 +148,8 @@ export interface ISocialLoginProviderConfigurationV2 {
148
148
  customised: boolean;
149
149
  }
150
150
  export interface ILoginViaSocialLogin {
151
- code: string;
151
+ code?: string;
152
+ idToken?: string;
152
153
  redirectUri?: string;
153
154
  provider: SocialLoginProviders;
154
155
  afterAuthRedirectUrl?: string;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.51
1
+ /** @license Frontegg v3.0.53
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.
@@ -13,6 +13,7 @@ exports.SocialLoginProviders = SocialLoginProviders;
13
13
  SocialLoginProviders["Google"] = "google";
14
14
  SocialLoginProviders["Github"] = "github";
15
15
  SocialLoginProviders["Slack"] = "slack";
16
+ SocialLoginProviders["Apple"] = "apple";
16
17
  })(SocialLoginProviders || (exports.SocialLoginProviders = SocialLoginProviders = {}));
17
18
 
18
19
  let AuthStrategyEnum;
@@ -605,15 +605,22 @@ async function getSocialLoginProvidersV2() {
605
605
  async function loginViaSocialLogin({
606
606
  provider,
607
607
  code,
608
+ idToken,
608
609
  redirectUri,
609
610
  codeVerifier,
610
611
  metadata,
611
612
  invitationToken,
612
613
  state
613
614
  }) {
614
- const params = {
615
- code
616
- };
615
+ const params = {};
616
+
617
+ if (code) {
618
+ params.code = code;
619
+ }
620
+
621
+ if (idToken) {
622
+ params.id_token = idToken;
623
+ }
617
624
 
618
625
  if (redirectUri) {
619
626
  params.redirectUri = redirectUri;
package/node/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Frontegg v3.0.51
1
+ /** @license Frontegg v3.0.53
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.51",
3
+ "version": "3.0.53",
4
4
  "main": "./node/index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {