@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 +2 -1
- package/auth/enums.js +1 -0
- package/auth/index.d.ts +1 -1
- package/auth/index.js +10 -3
- package/auth/interfaces.d.ts +2 -1
- package/index.js +1 -1
- package/node/auth/enums.js +1 -0
- package/node/auth/index.js +10 -3
- package/node/index.js +1 -1
- package/package.json +1 -1
package/auth/enums.d.ts
CHANGED
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
|
-
|
|
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;
|
package/auth/interfaces.d.ts
CHANGED
|
@@ -148,7 +148,8 @@ export interface ISocialLoginProviderConfigurationV2 {
|
|
|
148
148
|
customised: boolean;
|
|
149
149
|
}
|
|
150
150
|
export interface ILoginViaSocialLogin {
|
|
151
|
-
code
|
|
151
|
+
code?: string;
|
|
152
|
+
idToken?: string;
|
|
152
153
|
redirectUri?: string;
|
|
153
154
|
provider: SocialLoginProviders;
|
|
154
155
|
afterAuthRedirectUrl?: string;
|
package/index.js
CHANGED
package/node/auth/enums.js
CHANGED
|
@@ -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;
|
package/node/auth/index.js
CHANGED
|
@@ -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
|
-
|
|
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