@descope/web-js-sdk 1.27.2 → 1.29.0
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/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1467 -28
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
import * as oidc_client_ts from 'oidc-client-ts';
|
|
1
2
|
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
2
3
|
export { UserResponse } from '@descope/core-js-sdk';
|
|
3
4
|
|
|
5
|
+
type OidcConfigOptions = {
|
|
6
|
+
applicationId?: string;
|
|
7
|
+
redirectUri?: string;
|
|
8
|
+
scope?: string;
|
|
9
|
+
};
|
|
10
|
+
type OidcConfig = boolean | OidcConfigOptions;
|
|
11
|
+
|
|
4
12
|
/**
|
|
5
13
|
* Configuration for OneTap.
|
|
6
14
|
*/
|
|
@@ -68,18 +76,20 @@ declare const ensureFingerprintIds: (fpKey: string, baseUrl?: string) => Promise
|
|
|
68
76
|
/** Clear Fingerprint data from storage */
|
|
69
77
|
declare const clearFingerprintData: () => void;
|
|
70
78
|
|
|
79
|
+
declare const hasOidcParamsInUrl: () => boolean;
|
|
80
|
+
|
|
71
81
|
declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPersistTokens, sessionTokenViaCookie, storagePrefix, ...config }: Omit<{
|
|
72
82
|
projectId: string;
|
|
73
83
|
logger?: {
|
|
74
|
-
|
|
84
|
+
error: {
|
|
75
85
|
(...data: any[]): void;
|
|
76
86
|
(message?: any, ...optionalParams: any[]): void;
|
|
77
87
|
};
|
|
78
|
-
|
|
88
|
+
debug: {
|
|
79
89
|
(...data: any[]): void;
|
|
80
90
|
(message?: any, ...optionalParams: any[]): void;
|
|
81
91
|
};
|
|
82
|
-
|
|
92
|
+
log: {
|
|
83
93
|
(...data: any[]): void;
|
|
84
94
|
(message?: any, ...optionalParams: any[]): void;
|
|
85
95
|
};
|
|
@@ -104,8 +114,11 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
104
114
|
afterRequest?: ((req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>) | ((req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>)[];
|
|
105
115
|
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
106
116
|
};
|
|
117
|
+
} & {
|
|
118
|
+
oidcConfig?: OidcConfig;
|
|
107
119
|
} & FingerprintOptions & AutoRefreshOptions & LastLoggedInUserOptions & PersistTokensOptions<A>) => A extends false ? (({
|
|
108
120
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
121
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
109
122
|
flow: {
|
|
110
123
|
start: (flowId: string, options?: Pick<{
|
|
111
124
|
redirectUrl?: string;
|
|
@@ -182,8 +195,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
182
195
|
create: boolean;
|
|
183
196
|
}>>;
|
|
184
197
|
};
|
|
185
|
-
update: ((identifier: string, token
|
|
186
|
-
start: (loginId: string, origin: string, token
|
|
198
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
199
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
187
200
|
transactionId: string;
|
|
188
201
|
options: string;
|
|
189
202
|
create: boolean;
|
|
@@ -198,11 +211,38 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
198
211
|
};
|
|
199
212
|
};
|
|
200
213
|
fedcm: {
|
|
201
|
-
|
|
214
|
+
onetap: {
|
|
215
|
+
requestExchangeCode(options: {
|
|
216
|
+
provider?: string;
|
|
217
|
+
oneTapConfig?: OneTapConfig;
|
|
218
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
219
|
+
onSkipped?: (reason?: string) => void;
|
|
220
|
+
onDismissed?: (reason?: string) => void;
|
|
221
|
+
onFailed?: (error: Error) => void;
|
|
222
|
+
onCodeReceived: (code: string) => void;
|
|
223
|
+
}): void;
|
|
224
|
+
requestAuthentication(options?: {
|
|
225
|
+
provider?: string;
|
|
226
|
+
oneTapConfig?: OneTapConfig;
|
|
227
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
228
|
+
onSkipped?: (reason?: string) => void;
|
|
229
|
+
onDismissed?: (reason?: string) => void;
|
|
230
|
+
onFailed?: (error: Error) => void;
|
|
231
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
232
|
+
}): void;
|
|
233
|
+
};
|
|
234
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
202
235
|
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
203
236
|
isSupported(): boolean;
|
|
204
237
|
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
205
238
|
};
|
|
239
|
+
oidc: {
|
|
240
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
241
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
242
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
243
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
244
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
|
|
245
|
+
};
|
|
206
246
|
accessKey: {
|
|
207
247
|
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
208
248
|
};
|
|
@@ -562,6 +602,13 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
562
602
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
563
603
|
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
564
604
|
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
605
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
606
|
+
clientId: string;
|
|
607
|
+
}>>;
|
|
608
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
609
|
+
code: string;
|
|
610
|
+
}>>;
|
|
611
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
565
612
|
};
|
|
566
613
|
saml: {
|
|
567
614
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -654,7 +701,6 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
654
701
|
}>>;
|
|
655
702
|
};
|
|
656
703
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
657
|
-
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
658
704
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
659
705
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
660
706
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
@@ -717,6 +763,7 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
717
763
|
};
|
|
718
764
|
} | {
|
|
719
765
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
766
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
720
767
|
flow: {
|
|
721
768
|
start: (flowId: string, options?: Pick<{
|
|
722
769
|
redirectUrl?: string;
|
|
@@ -793,8 +840,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
793
840
|
create: boolean;
|
|
794
841
|
}>>;
|
|
795
842
|
};
|
|
796
|
-
update: ((identifier: string, token
|
|
797
|
-
start: (loginId: string, origin: string, token
|
|
843
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
844
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
798
845
|
transactionId: string;
|
|
799
846
|
options: string;
|
|
800
847
|
create: boolean;
|
|
@@ -809,11 +856,38 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
809
856
|
};
|
|
810
857
|
};
|
|
811
858
|
fedcm: {
|
|
812
|
-
|
|
859
|
+
onetap: {
|
|
860
|
+
requestExchangeCode(options: {
|
|
861
|
+
provider?: string;
|
|
862
|
+
oneTapConfig?: OneTapConfig;
|
|
863
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
864
|
+
onSkipped?: (reason?: string) => void;
|
|
865
|
+
onDismissed?: (reason?: string) => void;
|
|
866
|
+
onFailed?: (error: Error) => void;
|
|
867
|
+
onCodeReceived: (code: string) => void;
|
|
868
|
+
}): void;
|
|
869
|
+
requestAuthentication(options?: {
|
|
870
|
+
provider?: string;
|
|
871
|
+
oneTapConfig?: OneTapConfig;
|
|
872
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
873
|
+
onSkipped?: (reason?: string) => void;
|
|
874
|
+
onDismissed?: (reason?: string) => void;
|
|
875
|
+
onFailed?: (error: Error) => void;
|
|
876
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
877
|
+
}): void;
|
|
878
|
+
};
|
|
879
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
813
880
|
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
814
881
|
isSupported(): boolean;
|
|
815
882
|
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
816
883
|
};
|
|
884
|
+
oidc: {
|
|
885
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
886
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
887
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
888
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
889
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
|
|
890
|
+
};
|
|
817
891
|
accessKey: {
|
|
818
892
|
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
819
893
|
};
|
|
@@ -1173,6 +1247,13 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1173
1247
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1174
1248
|
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1175
1249
|
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1250
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1251
|
+
clientId: string;
|
|
1252
|
+
}>>;
|
|
1253
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1254
|
+
code: string;
|
|
1255
|
+
}>>;
|
|
1256
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1176
1257
|
};
|
|
1177
1258
|
saml: {
|
|
1178
1259
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -1265,7 +1346,6 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1265
1346
|
}>>;
|
|
1266
1347
|
};
|
|
1267
1348
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1268
|
-
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1269
1349
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1270
1350
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1271
1351
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
@@ -1326,15 +1406,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1326
1406
|
[key: string]: string;
|
|
1327
1407
|
}) => string;
|
|
1328
1408
|
};
|
|
1329
|
-
}
|
|
1330
|
-
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
1331
|
-
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
1332
|
-
onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
|
|
1333
|
-
}) & {
|
|
1334
|
-
getLastUserLoginId: () => string;
|
|
1335
|
-
getLastUserDisplayName: () => string;
|
|
1336
|
-
} : ((({
|
|
1409
|
+
} | {
|
|
1337
1410
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1411
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1338
1412
|
flow: {
|
|
1339
1413
|
start: (flowId: string, options?: Pick<{
|
|
1340
1414
|
redirectUrl?: string;
|
|
@@ -1411,8 +1485,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1411
1485
|
create: boolean;
|
|
1412
1486
|
}>>;
|
|
1413
1487
|
};
|
|
1414
|
-
update: ((identifier: string, token
|
|
1415
|
-
start: (loginId: string, origin: string, token
|
|
1488
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
1489
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1416
1490
|
transactionId: string;
|
|
1417
1491
|
options: string;
|
|
1418
1492
|
create: boolean;
|
|
@@ -1427,11 +1501,38 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1427
1501
|
};
|
|
1428
1502
|
};
|
|
1429
1503
|
fedcm: {
|
|
1430
|
-
|
|
1504
|
+
onetap: {
|
|
1505
|
+
requestExchangeCode(options: {
|
|
1506
|
+
provider?: string;
|
|
1507
|
+
oneTapConfig?: OneTapConfig;
|
|
1508
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
1509
|
+
onSkipped?: (reason?: string) => void;
|
|
1510
|
+
onDismissed?: (reason?: string) => void;
|
|
1511
|
+
onFailed?: (error: Error) => void;
|
|
1512
|
+
onCodeReceived: (code: string) => void;
|
|
1513
|
+
}): void;
|
|
1514
|
+
requestAuthentication(options?: {
|
|
1515
|
+
provider?: string;
|
|
1516
|
+
oneTapConfig?: OneTapConfig;
|
|
1517
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
1518
|
+
onSkipped?: (reason?: string) => void;
|
|
1519
|
+
onDismissed?: (reason?: string) => void;
|
|
1520
|
+
onFailed?: (error: Error) => void;
|
|
1521
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
1522
|
+
}): void;
|
|
1523
|
+
};
|
|
1524
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
1431
1525
|
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1432
1526
|
isSupported(): boolean;
|
|
1433
1527
|
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
1434
1528
|
};
|
|
1529
|
+
oidc: {
|
|
1530
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1531
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
1532
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
1533
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
1534
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1535
|
+
};
|
|
1435
1536
|
accessKey: {
|
|
1436
1537
|
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
1437
1538
|
};
|
|
@@ -1791,6 +1892,13 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1791
1892
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1792
1893
|
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1793
1894
|
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1895
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1896
|
+
clientId: string;
|
|
1897
|
+
}>>;
|
|
1898
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1899
|
+
code: string;
|
|
1900
|
+
}>>;
|
|
1901
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1794
1902
|
};
|
|
1795
1903
|
saml: {
|
|
1796
1904
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -1883,7 +1991,6 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1883
1991
|
}>>;
|
|
1884
1992
|
};
|
|
1885
1993
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1886
|
-
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1887
1994
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1888
1995
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1889
1996
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
@@ -1944,8 +2051,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
1944
2051
|
[key: string]: string;
|
|
1945
2052
|
}) => string;
|
|
1946
2053
|
};
|
|
1947
|
-
}
|
|
2054
|
+
}) & {
|
|
2055
|
+
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
2056
|
+
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
2057
|
+
onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
|
|
2058
|
+
}) & {
|
|
2059
|
+
getLastUserLoginId: () => string;
|
|
2060
|
+
getLastUserDisplayName: () => string;
|
|
2061
|
+
} : ((({
|
|
1948
2062
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2063
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1949
2064
|
flow: {
|
|
1950
2065
|
start: (flowId: string, options?: Pick<{
|
|
1951
2066
|
redirectUrl?: string;
|
|
@@ -2022,8 +2137,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
2022
2137
|
create: boolean;
|
|
2023
2138
|
}>>;
|
|
2024
2139
|
};
|
|
2025
|
-
update: ((identifier: string, token
|
|
2026
|
-
start: (loginId: string, origin: string, token
|
|
2140
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
2141
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2027
2142
|
transactionId: string;
|
|
2028
2143
|
options: string;
|
|
2029
2144
|
create: boolean;
|
|
@@ -2038,11 +2153,38 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
2038
2153
|
};
|
|
2039
2154
|
};
|
|
2040
2155
|
fedcm: {
|
|
2041
|
-
|
|
2156
|
+
onetap: {
|
|
2157
|
+
requestExchangeCode(options: {
|
|
2158
|
+
provider?: string;
|
|
2159
|
+
oneTapConfig?: OneTapConfig;
|
|
2160
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
2161
|
+
onSkipped?: (reason?: string) => void;
|
|
2162
|
+
onDismissed?: (reason?: string) => void;
|
|
2163
|
+
onFailed?: (error: Error) => void;
|
|
2164
|
+
onCodeReceived: (code: string) => void;
|
|
2165
|
+
}): void;
|
|
2166
|
+
requestAuthentication(options?: {
|
|
2167
|
+
provider?: string;
|
|
2168
|
+
oneTapConfig?: OneTapConfig;
|
|
2169
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
2170
|
+
onSkipped?: (reason?: string) => void;
|
|
2171
|
+
onDismissed?: (reason?: string) => void;
|
|
2172
|
+
onFailed?: (error: Error) => void;
|
|
2173
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
2174
|
+
}): void;
|
|
2175
|
+
};
|
|
2176
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
2042
2177
|
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2043
2178
|
isSupported(): boolean;
|
|
2044
2179
|
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
2045
2180
|
};
|
|
2181
|
+
oidc: {
|
|
2182
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2183
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
2184
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
2185
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
2186
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
|
|
2187
|
+
};
|
|
2046
2188
|
accessKey: {
|
|
2047
2189
|
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2048
2190
|
};
|
|
@@ -2402,6 +2544,13 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
2402
2544
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2403
2545
|
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2404
2546
|
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2547
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2548
|
+
clientId: string;
|
|
2549
|
+
}>>;
|
|
2550
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2551
|
+
code: string;
|
|
2552
|
+
}>>;
|
|
2553
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2405
2554
|
};
|
|
2406
2555
|
saml: {
|
|
2407
2556
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -2494,7 +2643,1296 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
2494
2643
|
}>>;
|
|
2495
2644
|
};
|
|
2496
2645
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2646
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2647
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2648
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2649
|
+
tenants: {
|
|
2650
|
+
id: string;
|
|
2651
|
+
name: string;
|
|
2652
|
+
customAttributes?: Record<string, any>;
|
|
2653
|
+
}[];
|
|
2654
|
+
}>>;
|
|
2655
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
2656
|
+
isJwtExpired: (token: string) => boolean;
|
|
2657
|
+
getTenants: (token: string) => string[];
|
|
2658
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2659
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2660
|
+
getCurrentTenant: (token: string) => string;
|
|
2661
|
+
httpClient: {
|
|
2662
|
+
get: (path: string, config?: {
|
|
2663
|
+
headers?: HeadersInit;
|
|
2664
|
+
queryParams?: {
|
|
2665
|
+
[key: string]: string;
|
|
2666
|
+
};
|
|
2667
|
+
token?: string;
|
|
2668
|
+
}) => Promise<Response>;
|
|
2669
|
+
post: (path: string, body?: any, config?: {
|
|
2670
|
+
headers?: HeadersInit;
|
|
2671
|
+
queryParams?: {
|
|
2672
|
+
[key: string]: string;
|
|
2673
|
+
};
|
|
2674
|
+
token?: string;
|
|
2675
|
+
}) => Promise<Response>;
|
|
2676
|
+
patch: (path: string, body?: any, config?: {
|
|
2677
|
+
headers?: HeadersInit;
|
|
2678
|
+
queryParams?: {
|
|
2679
|
+
[key: string]: string;
|
|
2680
|
+
};
|
|
2681
|
+
token?: string;
|
|
2682
|
+
}) => Promise<Response>;
|
|
2683
|
+
put: (path: string, body?: any, config?: {
|
|
2684
|
+
headers?: HeadersInit;
|
|
2685
|
+
queryParams?: {
|
|
2686
|
+
[key: string]: string;
|
|
2687
|
+
};
|
|
2688
|
+
token?: string;
|
|
2689
|
+
}) => Promise<Response>;
|
|
2690
|
+
delete: (path: string, config?: {
|
|
2691
|
+
headers?: HeadersInit;
|
|
2692
|
+
queryParams?: {
|
|
2693
|
+
[key: string]: string;
|
|
2694
|
+
};
|
|
2695
|
+
token?: string;
|
|
2696
|
+
}) => Promise<Response>;
|
|
2697
|
+
hooks?: {
|
|
2698
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
2699
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
2700
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
2701
|
+
};
|
|
2702
|
+
buildUrl: (path: string, queryParams?: {
|
|
2703
|
+
[key: string]: string;
|
|
2704
|
+
}) => string;
|
|
2705
|
+
};
|
|
2706
|
+
} | {
|
|
2707
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2497
2708
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2709
|
+
flow: {
|
|
2710
|
+
start: (flowId: string, options?: Pick<{
|
|
2711
|
+
redirectUrl?: string;
|
|
2712
|
+
location?: string;
|
|
2713
|
+
tenant?: string;
|
|
2714
|
+
deviceInfo?: {
|
|
2715
|
+
webAuthnSupport?: boolean;
|
|
2716
|
+
};
|
|
2717
|
+
lastAuth?: {
|
|
2718
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
2719
|
+
oauthProvider?: string;
|
|
2720
|
+
name?: string;
|
|
2721
|
+
loginId?: string;
|
|
2722
|
+
};
|
|
2723
|
+
redirectAuth?: {
|
|
2724
|
+
callbackUrl: string;
|
|
2725
|
+
codeChallenge: string;
|
|
2726
|
+
};
|
|
2727
|
+
oidcIdpStateId?: string;
|
|
2728
|
+
preview?: boolean;
|
|
2729
|
+
samlIdpStateId?: string;
|
|
2730
|
+
samlIdpUsername?: string;
|
|
2731
|
+
ssoAppId?: string;
|
|
2732
|
+
thirdPartyAppId?: string;
|
|
2733
|
+
oidcLoginHint?: string;
|
|
2734
|
+
abTestingKey?: number;
|
|
2735
|
+
startOptionsVersion?: number;
|
|
2736
|
+
client?: Record<string, any>;
|
|
2737
|
+
locale?: string;
|
|
2738
|
+
oidcPrompt?: string;
|
|
2739
|
+
oidcErrorRedirectUri?: string;
|
|
2740
|
+
nativeOptions?: {
|
|
2741
|
+
platform: "ios" | "android";
|
|
2742
|
+
oauthProvider?: string;
|
|
2743
|
+
oauthRedirect?: string;
|
|
2744
|
+
};
|
|
2745
|
+
thirdPartyAppStateId?: string;
|
|
2746
|
+
applicationScopes?: string;
|
|
2747
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
|
|
2748
|
+
lastAuth?: Omit<{
|
|
2749
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
2750
|
+
oauthProvider?: string;
|
|
2751
|
+
name?: string;
|
|
2752
|
+
loginId?: string;
|
|
2753
|
+
}, "loginId" | "name">;
|
|
2754
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
2755
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
2756
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2757
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
2758
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
2759
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2760
|
+
};
|
|
2761
|
+
webauthn: {
|
|
2762
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2763
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2764
|
+
transactionId: string;
|
|
2765
|
+
options: string;
|
|
2766
|
+
create: boolean;
|
|
2767
|
+
}>>;
|
|
2768
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2769
|
+
};
|
|
2770
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2771
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2772
|
+
transactionId: string;
|
|
2773
|
+
options: string;
|
|
2774
|
+
create: boolean;
|
|
2775
|
+
}>>;
|
|
2776
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2777
|
+
};
|
|
2778
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2779
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2780
|
+
transactionId: string;
|
|
2781
|
+
options: string;
|
|
2782
|
+
create: boolean;
|
|
2783
|
+
}>>;
|
|
2784
|
+
};
|
|
2785
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
2786
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2787
|
+
transactionId: string;
|
|
2788
|
+
options: string;
|
|
2789
|
+
create: boolean;
|
|
2790
|
+
}>>;
|
|
2791
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2792
|
+
};
|
|
2793
|
+
helpers: {
|
|
2794
|
+
create: (options: string) => Promise<string>;
|
|
2795
|
+
get: (options: string) => Promise<string>;
|
|
2796
|
+
isSupported: typeof isSupported;
|
|
2797
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
2798
|
+
};
|
|
2799
|
+
};
|
|
2800
|
+
fedcm: {
|
|
2801
|
+
onetap: {
|
|
2802
|
+
requestExchangeCode(options: {
|
|
2803
|
+
provider?: string;
|
|
2804
|
+
oneTapConfig?: OneTapConfig;
|
|
2805
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
2806
|
+
onSkipped?: (reason?: string) => void;
|
|
2807
|
+
onDismissed?: (reason?: string) => void;
|
|
2808
|
+
onFailed?: (error: Error) => void;
|
|
2809
|
+
onCodeReceived: (code: string) => void;
|
|
2810
|
+
}): void;
|
|
2811
|
+
requestAuthentication(options?: {
|
|
2812
|
+
provider?: string;
|
|
2813
|
+
oneTapConfig?: OneTapConfig;
|
|
2814
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
2815
|
+
onSkipped?: (reason?: string) => void;
|
|
2816
|
+
onDismissed?: (reason?: string) => void;
|
|
2817
|
+
onFailed?: (error: Error) => void;
|
|
2818
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
2819
|
+
}): void;
|
|
2820
|
+
};
|
|
2821
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
2822
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2823
|
+
isSupported(): boolean;
|
|
2824
|
+
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
2825
|
+
};
|
|
2826
|
+
oidc: {
|
|
2827
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2828
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
2829
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
2830
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
2831
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
|
|
2832
|
+
};
|
|
2833
|
+
accessKey: {
|
|
2834
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2835
|
+
};
|
|
2836
|
+
otp: {
|
|
2837
|
+
verify: {
|
|
2838
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2839
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2840
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2841
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2842
|
+
};
|
|
2843
|
+
signIn: {
|
|
2844
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2845
|
+
maskedPhone: string;
|
|
2846
|
+
}>>;
|
|
2847
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2848
|
+
maskedPhone: string;
|
|
2849
|
+
}>>;
|
|
2850
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2851
|
+
maskedPhone: string;
|
|
2852
|
+
}>>;
|
|
2853
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2854
|
+
maskedEmail: string;
|
|
2855
|
+
}>>;
|
|
2856
|
+
};
|
|
2857
|
+
signUp: {
|
|
2858
|
+
sms: (loginId: string, user?: {
|
|
2859
|
+
email?: string;
|
|
2860
|
+
name?: string;
|
|
2861
|
+
givenName?: string;
|
|
2862
|
+
middleName?: string;
|
|
2863
|
+
familyName?: string;
|
|
2864
|
+
phone?: string;
|
|
2865
|
+
}, signUpOptions?: {
|
|
2866
|
+
customClaims?: Record<string, any>;
|
|
2867
|
+
templateId?: string;
|
|
2868
|
+
templateOptions?: {
|
|
2869
|
+
[x: string]: string;
|
|
2870
|
+
};
|
|
2871
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2872
|
+
maskedPhone: string;
|
|
2873
|
+
}>>;
|
|
2874
|
+
voice: (loginId: string, user?: {
|
|
2875
|
+
email?: string;
|
|
2876
|
+
name?: string;
|
|
2877
|
+
givenName?: string;
|
|
2878
|
+
middleName?: string;
|
|
2879
|
+
familyName?: string;
|
|
2880
|
+
phone?: string;
|
|
2881
|
+
}, signUpOptions?: {
|
|
2882
|
+
customClaims?: Record<string, any>;
|
|
2883
|
+
templateId?: string;
|
|
2884
|
+
templateOptions?: {
|
|
2885
|
+
[x: string]: string;
|
|
2886
|
+
};
|
|
2887
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2888
|
+
maskedPhone: string;
|
|
2889
|
+
}>>;
|
|
2890
|
+
whatsapp: (loginId: string, user?: {
|
|
2891
|
+
email?: string;
|
|
2892
|
+
name?: string;
|
|
2893
|
+
givenName?: string;
|
|
2894
|
+
middleName?: string;
|
|
2895
|
+
familyName?: string;
|
|
2896
|
+
phone?: string;
|
|
2897
|
+
}, signUpOptions?: {
|
|
2898
|
+
customClaims?: Record<string, any>;
|
|
2899
|
+
templateId?: string;
|
|
2900
|
+
templateOptions?: {
|
|
2901
|
+
[x: string]: string;
|
|
2902
|
+
};
|
|
2903
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2904
|
+
maskedPhone: string;
|
|
2905
|
+
}>>;
|
|
2906
|
+
email: (loginId: string, user?: {
|
|
2907
|
+
email?: string;
|
|
2908
|
+
name?: string;
|
|
2909
|
+
givenName?: string;
|
|
2910
|
+
middleName?: string;
|
|
2911
|
+
familyName?: string;
|
|
2912
|
+
phone?: string;
|
|
2913
|
+
}, signUpOptions?: {
|
|
2914
|
+
customClaims?: Record<string, any>;
|
|
2915
|
+
templateId?: string;
|
|
2916
|
+
templateOptions?: {
|
|
2917
|
+
[x: string]: string;
|
|
2918
|
+
};
|
|
2919
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2920
|
+
maskedEmail: string;
|
|
2921
|
+
}>>;
|
|
2922
|
+
};
|
|
2923
|
+
signUpOrIn: {
|
|
2924
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2925
|
+
maskedPhone: string;
|
|
2926
|
+
}>>;
|
|
2927
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2928
|
+
maskedPhone: string;
|
|
2929
|
+
}>>;
|
|
2930
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2931
|
+
maskedPhone: string;
|
|
2932
|
+
}>>;
|
|
2933
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2934
|
+
maskedEmail: string;
|
|
2935
|
+
}>>;
|
|
2936
|
+
};
|
|
2937
|
+
update: {
|
|
2938
|
+
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
2939
|
+
addToLoginIDs?: T;
|
|
2940
|
+
onMergeUseExisting?: T extends true ? boolean : never;
|
|
2941
|
+
templateOptions?: {
|
|
2942
|
+
[x: string]: string;
|
|
2943
|
+
};
|
|
2944
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2945
|
+
maskedEmail: string;
|
|
2946
|
+
}>>;
|
|
2947
|
+
phone: {
|
|
2948
|
+
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2949
|
+
addToLoginIDs?: T_1;
|
|
2950
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
2951
|
+
templateOptions?: {
|
|
2952
|
+
[x: string]: string;
|
|
2953
|
+
};
|
|
2954
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2955
|
+
maskedPhone: string;
|
|
2956
|
+
}>>;
|
|
2957
|
+
voice: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2958
|
+
addToLoginIDs?: T_1;
|
|
2959
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
2960
|
+
templateOptions?: {
|
|
2961
|
+
[x: string]: string;
|
|
2962
|
+
};
|
|
2963
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2964
|
+
maskedPhone: string;
|
|
2965
|
+
}>>;
|
|
2966
|
+
whatsapp: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2967
|
+
addToLoginIDs?: T_1;
|
|
2968
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
2969
|
+
templateOptions?: {
|
|
2970
|
+
[x: string]: string;
|
|
2971
|
+
};
|
|
2972
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2973
|
+
maskedPhone: string;
|
|
2974
|
+
}>>;
|
|
2975
|
+
};
|
|
2976
|
+
};
|
|
2977
|
+
};
|
|
2978
|
+
magicLink: {
|
|
2979
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2980
|
+
signIn: {
|
|
2981
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2982
|
+
maskedPhone: string;
|
|
2983
|
+
}>>;
|
|
2984
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2985
|
+
maskedPhone: string;
|
|
2986
|
+
}>>;
|
|
2987
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2988
|
+
maskedPhone: string;
|
|
2989
|
+
}>>;
|
|
2990
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2991
|
+
maskedEmail: string;
|
|
2992
|
+
}>>;
|
|
2993
|
+
};
|
|
2994
|
+
signUp: {
|
|
2995
|
+
sms: (loginId: string, URI: string, user?: {
|
|
2996
|
+
email?: string;
|
|
2997
|
+
name?: string;
|
|
2998
|
+
givenName?: string;
|
|
2999
|
+
middleName?: string;
|
|
3000
|
+
familyName?: string;
|
|
3001
|
+
phone?: string;
|
|
3002
|
+
}, signUpOptions?: {
|
|
3003
|
+
customClaims?: Record<string, any>;
|
|
3004
|
+
templateId?: string;
|
|
3005
|
+
templateOptions?: {
|
|
3006
|
+
[x: string]: string;
|
|
3007
|
+
};
|
|
3008
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3009
|
+
maskedPhone: string;
|
|
3010
|
+
}>>;
|
|
3011
|
+
voice: (loginId: string, URI: string, user?: {
|
|
3012
|
+
email?: string;
|
|
3013
|
+
name?: string;
|
|
3014
|
+
givenName?: string;
|
|
3015
|
+
middleName?: string;
|
|
3016
|
+
familyName?: string;
|
|
3017
|
+
phone?: string;
|
|
3018
|
+
}, signUpOptions?: {
|
|
3019
|
+
customClaims?: Record<string, any>;
|
|
3020
|
+
templateId?: string;
|
|
3021
|
+
templateOptions?: {
|
|
3022
|
+
[x: string]: string;
|
|
3023
|
+
};
|
|
3024
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3025
|
+
maskedPhone: string;
|
|
3026
|
+
}>>;
|
|
3027
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
3028
|
+
email?: string;
|
|
3029
|
+
name?: string;
|
|
3030
|
+
givenName?: string;
|
|
3031
|
+
middleName?: string;
|
|
3032
|
+
familyName?: string;
|
|
3033
|
+
phone?: string;
|
|
3034
|
+
}, signUpOptions?: {
|
|
3035
|
+
customClaims?: Record<string, any>;
|
|
3036
|
+
templateId?: string;
|
|
3037
|
+
templateOptions?: {
|
|
3038
|
+
[x: string]: string;
|
|
3039
|
+
};
|
|
3040
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3041
|
+
maskedPhone: string;
|
|
3042
|
+
}>>;
|
|
3043
|
+
email: (loginId: string, URI: string, user?: {
|
|
3044
|
+
email?: string;
|
|
3045
|
+
name?: string;
|
|
3046
|
+
givenName?: string;
|
|
3047
|
+
middleName?: string;
|
|
3048
|
+
familyName?: string;
|
|
3049
|
+
phone?: string;
|
|
3050
|
+
}, signUpOptions?: {
|
|
3051
|
+
customClaims?: Record<string, any>;
|
|
3052
|
+
templateId?: string;
|
|
3053
|
+
templateOptions?: {
|
|
3054
|
+
[x: string]: string;
|
|
3055
|
+
};
|
|
3056
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3057
|
+
maskedEmail: string;
|
|
3058
|
+
}>>;
|
|
3059
|
+
};
|
|
3060
|
+
signUpOrIn: {
|
|
3061
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
3062
|
+
customClaims?: Record<string, any>;
|
|
3063
|
+
templateId?: string;
|
|
3064
|
+
templateOptions?: {
|
|
3065
|
+
[x: string]: string;
|
|
3066
|
+
};
|
|
3067
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3068
|
+
maskedPhone: string;
|
|
3069
|
+
}>>;
|
|
3070
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
3071
|
+
customClaims?: Record<string, any>;
|
|
3072
|
+
templateId?: string;
|
|
3073
|
+
templateOptions?: {
|
|
3074
|
+
[x: string]: string;
|
|
3075
|
+
};
|
|
3076
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3077
|
+
maskedPhone: string;
|
|
3078
|
+
}>>;
|
|
3079
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
3080
|
+
customClaims?: Record<string, any>;
|
|
3081
|
+
templateId?: string;
|
|
3082
|
+
templateOptions?: {
|
|
3083
|
+
[x: string]: string;
|
|
3084
|
+
};
|
|
3085
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3086
|
+
maskedPhone: string;
|
|
3087
|
+
}>>;
|
|
3088
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
3089
|
+
customClaims?: Record<string, any>;
|
|
3090
|
+
templateId?: string;
|
|
3091
|
+
templateOptions?: {
|
|
3092
|
+
[x: string]: string;
|
|
3093
|
+
};
|
|
3094
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3095
|
+
maskedEmail: string;
|
|
3096
|
+
}>>;
|
|
3097
|
+
};
|
|
3098
|
+
update: {
|
|
3099
|
+
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3100
|
+
addToLoginIDs?: T_2;
|
|
3101
|
+
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
3102
|
+
templateOptions?: {
|
|
3103
|
+
[x: string]: string;
|
|
3104
|
+
};
|
|
3105
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3106
|
+
maskedEmail: string;
|
|
3107
|
+
}>>;
|
|
3108
|
+
phone: {
|
|
3109
|
+
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3110
|
+
addToLoginIDs?: T_3;
|
|
3111
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3112
|
+
templateOptions?: {
|
|
3113
|
+
[x: string]: string;
|
|
3114
|
+
};
|
|
3115
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3116
|
+
maskedPhone: string;
|
|
3117
|
+
}>>;
|
|
3118
|
+
voice: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3119
|
+
addToLoginIDs?: T_3;
|
|
3120
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3121
|
+
templateOptions?: {
|
|
3122
|
+
[x: string]: string;
|
|
3123
|
+
};
|
|
3124
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3125
|
+
maskedPhone: string;
|
|
3126
|
+
}>>;
|
|
3127
|
+
whatsapp: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3128
|
+
addToLoginIDs?: T_3;
|
|
3129
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3130
|
+
templateOptions?: {
|
|
3131
|
+
[x: string]: string;
|
|
3132
|
+
};
|
|
3133
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3134
|
+
maskedPhone: string;
|
|
3135
|
+
}>>;
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
};
|
|
3139
|
+
enchantedLink: {
|
|
3140
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3141
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3142
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
3143
|
+
customClaims?: Record<string, any>;
|
|
3144
|
+
templateId?: string;
|
|
3145
|
+
templateOptions?: {
|
|
3146
|
+
[x: string]: string;
|
|
3147
|
+
};
|
|
3148
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3149
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
3150
|
+
email?: string;
|
|
3151
|
+
name?: string;
|
|
3152
|
+
givenName?: string;
|
|
3153
|
+
middleName?: string;
|
|
3154
|
+
familyName?: string;
|
|
3155
|
+
phone?: string;
|
|
3156
|
+
}, signUpOptions?: {
|
|
3157
|
+
customClaims?: Record<string, any>;
|
|
3158
|
+
templateId?: string;
|
|
3159
|
+
templateOptions?: {
|
|
3160
|
+
[x: string]: string;
|
|
3161
|
+
};
|
|
3162
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3163
|
+
waitForSession: (pendingRef: string, config?: {
|
|
3164
|
+
pollingIntervalMs: number;
|
|
3165
|
+
timeoutMs: number;
|
|
3166
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3167
|
+
update: {
|
|
3168
|
+
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3169
|
+
addToLoginIDs?: T_4;
|
|
3170
|
+
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
3171
|
+
templateOptions?: {
|
|
3172
|
+
[x: string]: string;
|
|
3173
|
+
};
|
|
3174
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
oauth: {
|
|
3178
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
3179
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3180
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3181
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3182
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3183
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3184
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3185
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3186
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3187
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3188
|
+
};
|
|
3189
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3190
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3191
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3192
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3193
|
+
clientId: string;
|
|
3194
|
+
}>>;
|
|
3195
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3196
|
+
code: string;
|
|
3197
|
+
}>>;
|
|
3198
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3199
|
+
};
|
|
3200
|
+
saml: {
|
|
3201
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3202
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3203
|
+
};
|
|
3204
|
+
totp: {
|
|
3205
|
+
signUp: (loginId: string, user?: {
|
|
3206
|
+
email?: string;
|
|
3207
|
+
name?: string;
|
|
3208
|
+
givenName?: string;
|
|
3209
|
+
middleName?: string;
|
|
3210
|
+
familyName?: string;
|
|
3211
|
+
phone?: string;
|
|
3212
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
3213
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3214
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
3215
|
+
};
|
|
3216
|
+
notp: {
|
|
3217
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
3218
|
+
customClaims?: Record<string, any>;
|
|
3219
|
+
templateId?: string;
|
|
3220
|
+
templateOptions?: {
|
|
3221
|
+
[x: string]: string;
|
|
3222
|
+
};
|
|
3223
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3224
|
+
pendingRef: string;
|
|
3225
|
+
redirectUrl: string;
|
|
3226
|
+
image: string;
|
|
3227
|
+
}>>;
|
|
3228
|
+
signUp: (loginId?: string, user?: {
|
|
3229
|
+
email?: string;
|
|
3230
|
+
name?: string;
|
|
3231
|
+
givenName?: string;
|
|
3232
|
+
middleName?: string;
|
|
3233
|
+
familyName?: string;
|
|
3234
|
+
phone?: string;
|
|
3235
|
+
}, signUpOptions?: {
|
|
3236
|
+
customClaims?: Record<string, any>;
|
|
3237
|
+
templateId?: string;
|
|
3238
|
+
templateOptions?: {
|
|
3239
|
+
[x: string]: string;
|
|
3240
|
+
};
|
|
3241
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3242
|
+
pendingRef: string;
|
|
3243
|
+
redirectUrl: string;
|
|
3244
|
+
image: string;
|
|
3245
|
+
}>>;
|
|
3246
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3247
|
+
pendingRef: string;
|
|
3248
|
+
redirectUrl: string;
|
|
3249
|
+
image: string;
|
|
3250
|
+
}>>;
|
|
3251
|
+
waitForSession: (pendingRef: string, config?: {
|
|
3252
|
+
pollingIntervalMs: number;
|
|
3253
|
+
timeoutMs: number;
|
|
3254
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3255
|
+
};
|
|
3256
|
+
password: {
|
|
3257
|
+
signUp: (loginId: string, password: string, user?: {
|
|
3258
|
+
email?: string;
|
|
3259
|
+
name?: string;
|
|
3260
|
+
givenName?: string;
|
|
3261
|
+
middleName?: string;
|
|
3262
|
+
familyName?: string;
|
|
3263
|
+
phone?: string;
|
|
3264
|
+
}, signUpOptions?: {
|
|
3265
|
+
customClaims?: Record<string, any>;
|
|
3266
|
+
templateId?: string;
|
|
3267
|
+
templateOptions?: {
|
|
3268
|
+
[x: string]: string;
|
|
3269
|
+
};
|
|
3270
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3271
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3272
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
3273
|
+
[x: string]: string;
|
|
3274
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3275
|
+
resetMethod: string;
|
|
3276
|
+
pendingRef?: string;
|
|
3277
|
+
linkId?: string;
|
|
3278
|
+
maskedEmail: string;
|
|
3279
|
+
}>>;
|
|
3280
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3281
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3282
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3283
|
+
minLength: number;
|
|
3284
|
+
lowercase: boolean;
|
|
3285
|
+
uppercase: boolean;
|
|
3286
|
+
number: boolean;
|
|
3287
|
+
nonAlphanumeric: boolean;
|
|
3288
|
+
}>>;
|
|
3289
|
+
};
|
|
3290
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3291
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3292
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
3293
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3294
|
+
tenants: {
|
|
3295
|
+
id: string;
|
|
3296
|
+
name: string;
|
|
3297
|
+
customAttributes?: Record<string, any>;
|
|
3298
|
+
}[];
|
|
3299
|
+
}>>;
|
|
3300
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
3301
|
+
isJwtExpired: (token: string) => boolean;
|
|
3302
|
+
getTenants: (token: string) => string[];
|
|
3303
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
3304
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
3305
|
+
getCurrentTenant: (token: string) => string;
|
|
3306
|
+
httpClient: {
|
|
3307
|
+
get: (path: string, config?: {
|
|
3308
|
+
headers?: HeadersInit;
|
|
3309
|
+
queryParams?: {
|
|
3310
|
+
[key: string]: string;
|
|
3311
|
+
};
|
|
3312
|
+
token?: string;
|
|
3313
|
+
}) => Promise<Response>;
|
|
3314
|
+
post: (path: string, body?: any, config?: {
|
|
3315
|
+
headers?: HeadersInit;
|
|
3316
|
+
queryParams?: {
|
|
3317
|
+
[key: string]: string;
|
|
3318
|
+
};
|
|
3319
|
+
token?: string;
|
|
3320
|
+
}) => Promise<Response>;
|
|
3321
|
+
patch: (path: string, body?: any, config?: {
|
|
3322
|
+
headers?: HeadersInit;
|
|
3323
|
+
queryParams?: {
|
|
3324
|
+
[key: string]: string;
|
|
3325
|
+
};
|
|
3326
|
+
token?: string;
|
|
3327
|
+
}) => Promise<Response>;
|
|
3328
|
+
put: (path: string, body?: any, config?: {
|
|
3329
|
+
headers?: HeadersInit;
|
|
3330
|
+
queryParams?: {
|
|
3331
|
+
[key: string]: string;
|
|
3332
|
+
};
|
|
3333
|
+
token?: string;
|
|
3334
|
+
}) => Promise<Response>;
|
|
3335
|
+
delete: (path: string, config?: {
|
|
3336
|
+
headers?: HeadersInit;
|
|
3337
|
+
queryParams?: {
|
|
3338
|
+
[key: string]: string;
|
|
3339
|
+
};
|
|
3340
|
+
token?: string;
|
|
3341
|
+
}) => Promise<Response>;
|
|
3342
|
+
hooks?: {
|
|
3343
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
3344
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
3345
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
3346
|
+
};
|
|
3347
|
+
buildUrl: (path: string, queryParams?: {
|
|
3348
|
+
[key: string]: string;
|
|
3349
|
+
}) => string;
|
|
3350
|
+
};
|
|
3351
|
+
} | {
|
|
3352
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3353
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3354
|
+
flow: {
|
|
3355
|
+
start: (flowId: string, options?: Pick<{
|
|
3356
|
+
redirectUrl?: string;
|
|
3357
|
+
location?: string;
|
|
3358
|
+
tenant?: string;
|
|
3359
|
+
deviceInfo?: {
|
|
3360
|
+
webAuthnSupport?: boolean;
|
|
3361
|
+
};
|
|
3362
|
+
lastAuth?: {
|
|
3363
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
3364
|
+
oauthProvider?: string;
|
|
3365
|
+
name?: string;
|
|
3366
|
+
loginId?: string;
|
|
3367
|
+
};
|
|
3368
|
+
redirectAuth?: {
|
|
3369
|
+
callbackUrl: string;
|
|
3370
|
+
codeChallenge: string;
|
|
3371
|
+
};
|
|
3372
|
+
oidcIdpStateId?: string;
|
|
3373
|
+
preview?: boolean;
|
|
3374
|
+
samlIdpStateId?: string;
|
|
3375
|
+
samlIdpUsername?: string;
|
|
3376
|
+
ssoAppId?: string;
|
|
3377
|
+
thirdPartyAppId?: string;
|
|
3378
|
+
oidcLoginHint?: string;
|
|
3379
|
+
abTestingKey?: number;
|
|
3380
|
+
startOptionsVersion?: number;
|
|
3381
|
+
client?: Record<string, any>;
|
|
3382
|
+
locale?: string;
|
|
3383
|
+
oidcPrompt?: string;
|
|
3384
|
+
oidcErrorRedirectUri?: string;
|
|
3385
|
+
nativeOptions?: {
|
|
3386
|
+
platform: "ios" | "android";
|
|
3387
|
+
oauthProvider?: string;
|
|
3388
|
+
oauthRedirect?: string;
|
|
3389
|
+
};
|
|
3390
|
+
thirdPartyAppStateId?: string;
|
|
3391
|
+
applicationScopes?: string;
|
|
3392
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
|
|
3393
|
+
lastAuth?: Omit<{
|
|
3394
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
3395
|
+
oauthProvider?: string;
|
|
3396
|
+
name?: string;
|
|
3397
|
+
loginId?: string;
|
|
3398
|
+
}, "loginId" | "name">;
|
|
3399
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
3400
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
3401
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
3402
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
3403
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
|
|
3404
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
3405
|
+
};
|
|
3406
|
+
webauthn: {
|
|
3407
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
3408
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3409
|
+
transactionId: string;
|
|
3410
|
+
options: string;
|
|
3411
|
+
create: boolean;
|
|
3412
|
+
}>>;
|
|
3413
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3414
|
+
};
|
|
3415
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
3416
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3417
|
+
transactionId: string;
|
|
3418
|
+
options: string;
|
|
3419
|
+
create: boolean;
|
|
3420
|
+
}>>;
|
|
3421
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3422
|
+
};
|
|
3423
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
3424
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3425
|
+
transactionId: string;
|
|
3426
|
+
options: string;
|
|
3427
|
+
create: boolean;
|
|
3428
|
+
}>>;
|
|
3429
|
+
};
|
|
3430
|
+
update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
3431
|
+
start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3432
|
+
transactionId: string;
|
|
3433
|
+
options: string;
|
|
3434
|
+
create: boolean;
|
|
3435
|
+
}>>;
|
|
3436
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3437
|
+
};
|
|
3438
|
+
helpers: {
|
|
3439
|
+
create: (options: string) => Promise<string>;
|
|
3440
|
+
get: (options: string) => Promise<string>;
|
|
3441
|
+
isSupported: typeof isSupported;
|
|
3442
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
3443
|
+
};
|
|
3444
|
+
};
|
|
3445
|
+
fedcm: {
|
|
3446
|
+
onetap: {
|
|
3447
|
+
requestExchangeCode(options: {
|
|
3448
|
+
provider?: string;
|
|
3449
|
+
oneTapConfig?: OneTapConfig;
|
|
3450
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
3451
|
+
onSkipped?: (reason?: string) => void;
|
|
3452
|
+
onDismissed?: (reason?: string) => void;
|
|
3453
|
+
onFailed?: (error: Error) => void;
|
|
3454
|
+
onCodeReceived: (code: string) => void;
|
|
3455
|
+
}): void;
|
|
3456
|
+
requestAuthentication(options?: {
|
|
3457
|
+
provider?: string;
|
|
3458
|
+
oneTapConfig?: OneTapConfig;
|
|
3459
|
+
loginOptions?: _descope_core_js_sdk.LoginOptions;
|
|
3460
|
+
onSkipped?: (reason?: string) => void;
|
|
3461
|
+
onDismissed?: (reason?: string) => void;
|
|
3462
|
+
onFailed?: (error: Error) => void;
|
|
3463
|
+
onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
|
|
3464
|
+
}): void;
|
|
3465
|
+
};
|
|
3466
|
+
oneTap(provider?: string, oneTapConfig?: OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
|
|
3467
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3468
|
+
isSupported(): boolean;
|
|
3469
|
+
isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
|
|
3470
|
+
};
|
|
3471
|
+
oidc: {
|
|
3472
|
+
loginWithRedirect: (arg?: oidc_client_ts.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3473
|
+
finishLogin: (url?: string) => Promise<any>;
|
|
3474
|
+
finishLoginIfNeed: (url?: string) => Promise<any>;
|
|
3475
|
+
refreshToken: (refreshToken: string) => Promise<oidc_client_ts.SigninResponse>;
|
|
3476
|
+
logout: (arg?: oidc_client_ts.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3477
|
+
};
|
|
3478
|
+
accessKey: {
|
|
3479
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
3480
|
+
};
|
|
3481
|
+
otp: {
|
|
3482
|
+
verify: {
|
|
3483
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3484
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3485
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3486
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3487
|
+
};
|
|
3488
|
+
signIn: {
|
|
3489
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3490
|
+
maskedPhone: string;
|
|
3491
|
+
}>>;
|
|
3492
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3493
|
+
maskedPhone: string;
|
|
3494
|
+
}>>;
|
|
3495
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3496
|
+
maskedPhone: string;
|
|
3497
|
+
}>>;
|
|
3498
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3499
|
+
maskedEmail: string;
|
|
3500
|
+
}>>;
|
|
3501
|
+
};
|
|
3502
|
+
signUp: {
|
|
3503
|
+
sms: (loginId: string, user?: {
|
|
3504
|
+
email?: string;
|
|
3505
|
+
name?: string;
|
|
3506
|
+
givenName?: string;
|
|
3507
|
+
middleName?: string;
|
|
3508
|
+
familyName?: string;
|
|
3509
|
+
phone?: string;
|
|
3510
|
+
}, signUpOptions?: {
|
|
3511
|
+
customClaims?: Record<string, any>;
|
|
3512
|
+
templateId?: string;
|
|
3513
|
+
templateOptions?: {
|
|
3514
|
+
[x: string]: string;
|
|
3515
|
+
};
|
|
3516
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3517
|
+
maskedPhone: string;
|
|
3518
|
+
}>>;
|
|
3519
|
+
voice: (loginId: string, user?: {
|
|
3520
|
+
email?: string;
|
|
3521
|
+
name?: string;
|
|
3522
|
+
givenName?: string;
|
|
3523
|
+
middleName?: string;
|
|
3524
|
+
familyName?: string;
|
|
3525
|
+
phone?: string;
|
|
3526
|
+
}, signUpOptions?: {
|
|
3527
|
+
customClaims?: Record<string, any>;
|
|
3528
|
+
templateId?: string;
|
|
3529
|
+
templateOptions?: {
|
|
3530
|
+
[x: string]: string;
|
|
3531
|
+
};
|
|
3532
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3533
|
+
maskedPhone: string;
|
|
3534
|
+
}>>;
|
|
3535
|
+
whatsapp: (loginId: string, user?: {
|
|
3536
|
+
email?: string;
|
|
3537
|
+
name?: string;
|
|
3538
|
+
givenName?: string;
|
|
3539
|
+
middleName?: string;
|
|
3540
|
+
familyName?: string;
|
|
3541
|
+
phone?: string;
|
|
3542
|
+
}, signUpOptions?: {
|
|
3543
|
+
customClaims?: Record<string, any>;
|
|
3544
|
+
templateId?: string;
|
|
3545
|
+
templateOptions?: {
|
|
3546
|
+
[x: string]: string;
|
|
3547
|
+
};
|
|
3548
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3549
|
+
maskedPhone: string;
|
|
3550
|
+
}>>;
|
|
3551
|
+
email: (loginId: string, user?: {
|
|
3552
|
+
email?: string;
|
|
3553
|
+
name?: string;
|
|
3554
|
+
givenName?: string;
|
|
3555
|
+
middleName?: string;
|
|
3556
|
+
familyName?: string;
|
|
3557
|
+
phone?: string;
|
|
3558
|
+
}, signUpOptions?: {
|
|
3559
|
+
customClaims?: Record<string, any>;
|
|
3560
|
+
templateId?: string;
|
|
3561
|
+
templateOptions?: {
|
|
3562
|
+
[x: string]: string;
|
|
3563
|
+
};
|
|
3564
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3565
|
+
maskedEmail: string;
|
|
3566
|
+
}>>;
|
|
3567
|
+
};
|
|
3568
|
+
signUpOrIn: {
|
|
3569
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3570
|
+
maskedPhone: string;
|
|
3571
|
+
}>>;
|
|
3572
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3573
|
+
maskedPhone: string;
|
|
3574
|
+
}>>;
|
|
3575
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3576
|
+
maskedPhone: string;
|
|
3577
|
+
}>>;
|
|
3578
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3579
|
+
maskedEmail: string;
|
|
3580
|
+
}>>;
|
|
3581
|
+
};
|
|
3582
|
+
update: {
|
|
3583
|
+
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3584
|
+
addToLoginIDs?: T;
|
|
3585
|
+
onMergeUseExisting?: T extends true ? boolean : never;
|
|
3586
|
+
templateOptions?: {
|
|
3587
|
+
[x: string]: string;
|
|
3588
|
+
};
|
|
3589
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3590
|
+
maskedEmail: string;
|
|
3591
|
+
}>>;
|
|
3592
|
+
phone: {
|
|
3593
|
+
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3594
|
+
addToLoginIDs?: T_1;
|
|
3595
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
3596
|
+
templateOptions?: {
|
|
3597
|
+
[x: string]: string;
|
|
3598
|
+
};
|
|
3599
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3600
|
+
maskedPhone: string;
|
|
3601
|
+
}>>;
|
|
3602
|
+
voice: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3603
|
+
addToLoginIDs?: T_1;
|
|
3604
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
3605
|
+
templateOptions?: {
|
|
3606
|
+
[x: string]: string;
|
|
3607
|
+
};
|
|
3608
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3609
|
+
maskedPhone: string;
|
|
3610
|
+
}>>;
|
|
3611
|
+
whatsapp: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3612
|
+
addToLoginIDs?: T_1;
|
|
3613
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
3614
|
+
templateOptions?: {
|
|
3615
|
+
[x: string]: string;
|
|
3616
|
+
};
|
|
3617
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3618
|
+
maskedPhone: string;
|
|
3619
|
+
}>>;
|
|
3620
|
+
};
|
|
3621
|
+
};
|
|
3622
|
+
};
|
|
3623
|
+
magicLink: {
|
|
3624
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3625
|
+
signIn: {
|
|
3626
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3627
|
+
maskedPhone: string;
|
|
3628
|
+
}>>;
|
|
3629
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3630
|
+
maskedPhone: string;
|
|
3631
|
+
}>>;
|
|
3632
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3633
|
+
maskedPhone: string;
|
|
3634
|
+
}>>;
|
|
3635
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3636
|
+
maskedEmail: string;
|
|
3637
|
+
}>>;
|
|
3638
|
+
};
|
|
3639
|
+
signUp: {
|
|
3640
|
+
sms: (loginId: string, URI: string, user?: {
|
|
3641
|
+
email?: string;
|
|
3642
|
+
name?: string;
|
|
3643
|
+
givenName?: string;
|
|
3644
|
+
middleName?: string;
|
|
3645
|
+
familyName?: string;
|
|
3646
|
+
phone?: string;
|
|
3647
|
+
}, signUpOptions?: {
|
|
3648
|
+
customClaims?: Record<string, any>;
|
|
3649
|
+
templateId?: string;
|
|
3650
|
+
templateOptions?: {
|
|
3651
|
+
[x: string]: string;
|
|
3652
|
+
};
|
|
3653
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3654
|
+
maskedPhone: string;
|
|
3655
|
+
}>>;
|
|
3656
|
+
voice: (loginId: string, URI: string, user?: {
|
|
3657
|
+
email?: string;
|
|
3658
|
+
name?: string;
|
|
3659
|
+
givenName?: string;
|
|
3660
|
+
middleName?: string;
|
|
3661
|
+
familyName?: string;
|
|
3662
|
+
phone?: string;
|
|
3663
|
+
}, signUpOptions?: {
|
|
3664
|
+
customClaims?: Record<string, any>;
|
|
3665
|
+
templateId?: string;
|
|
3666
|
+
templateOptions?: {
|
|
3667
|
+
[x: string]: string;
|
|
3668
|
+
};
|
|
3669
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3670
|
+
maskedPhone: string;
|
|
3671
|
+
}>>;
|
|
3672
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
3673
|
+
email?: string;
|
|
3674
|
+
name?: string;
|
|
3675
|
+
givenName?: string;
|
|
3676
|
+
middleName?: string;
|
|
3677
|
+
familyName?: string;
|
|
3678
|
+
phone?: string;
|
|
3679
|
+
}, signUpOptions?: {
|
|
3680
|
+
customClaims?: Record<string, any>;
|
|
3681
|
+
templateId?: string;
|
|
3682
|
+
templateOptions?: {
|
|
3683
|
+
[x: string]: string;
|
|
3684
|
+
};
|
|
3685
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3686
|
+
maskedPhone: string;
|
|
3687
|
+
}>>;
|
|
3688
|
+
email: (loginId: string, URI: string, user?: {
|
|
3689
|
+
email?: string;
|
|
3690
|
+
name?: string;
|
|
3691
|
+
givenName?: string;
|
|
3692
|
+
middleName?: string;
|
|
3693
|
+
familyName?: string;
|
|
3694
|
+
phone?: string;
|
|
3695
|
+
}, signUpOptions?: {
|
|
3696
|
+
customClaims?: Record<string, any>;
|
|
3697
|
+
templateId?: string;
|
|
3698
|
+
templateOptions?: {
|
|
3699
|
+
[x: string]: string;
|
|
3700
|
+
};
|
|
3701
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3702
|
+
maskedEmail: string;
|
|
3703
|
+
}>>;
|
|
3704
|
+
};
|
|
3705
|
+
signUpOrIn: {
|
|
3706
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
3707
|
+
customClaims?: Record<string, any>;
|
|
3708
|
+
templateId?: string;
|
|
3709
|
+
templateOptions?: {
|
|
3710
|
+
[x: string]: string;
|
|
3711
|
+
};
|
|
3712
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3713
|
+
maskedPhone: string;
|
|
3714
|
+
}>>;
|
|
3715
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
3716
|
+
customClaims?: Record<string, any>;
|
|
3717
|
+
templateId?: string;
|
|
3718
|
+
templateOptions?: {
|
|
3719
|
+
[x: string]: string;
|
|
3720
|
+
};
|
|
3721
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3722
|
+
maskedPhone: string;
|
|
3723
|
+
}>>;
|
|
3724
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
3725
|
+
customClaims?: Record<string, any>;
|
|
3726
|
+
templateId?: string;
|
|
3727
|
+
templateOptions?: {
|
|
3728
|
+
[x: string]: string;
|
|
3729
|
+
};
|
|
3730
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3731
|
+
maskedPhone: string;
|
|
3732
|
+
}>>;
|
|
3733
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
3734
|
+
customClaims?: Record<string, any>;
|
|
3735
|
+
templateId?: string;
|
|
3736
|
+
templateOptions?: {
|
|
3737
|
+
[x: string]: string;
|
|
3738
|
+
};
|
|
3739
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3740
|
+
maskedEmail: string;
|
|
3741
|
+
}>>;
|
|
3742
|
+
};
|
|
3743
|
+
update: {
|
|
3744
|
+
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3745
|
+
addToLoginIDs?: T_2;
|
|
3746
|
+
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
3747
|
+
templateOptions?: {
|
|
3748
|
+
[x: string]: string;
|
|
3749
|
+
};
|
|
3750
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3751
|
+
maskedEmail: string;
|
|
3752
|
+
}>>;
|
|
3753
|
+
phone: {
|
|
3754
|
+
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3755
|
+
addToLoginIDs?: T_3;
|
|
3756
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3757
|
+
templateOptions?: {
|
|
3758
|
+
[x: string]: string;
|
|
3759
|
+
};
|
|
3760
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3761
|
+
maskedPhone: string;
|
|
3762
|
+
}>>;
|
|
3763
|
+
voice: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3764
|
+
addToLoginIDs?: T_3;
|
|
3765
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3766
|
+
templateOptions?: {
|
|
3767
|
+
[x: string]: string;
|
|
3768
|
+
};
|
|
3769
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3770
|
+
maskedPhone: string;
|
|
3771
|
+
}>>;
|
|
3772
|
+
whatsapp: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3773
|
+
addToLoginIDs?: T_3;
|
|
3774
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
3775
|
+
templateOptions?: {
|
|
3776
|
+
[x: string]: string;
|
|
3777
|
+
};
|
|
3778
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3779
|
+
maskedPhone: string;
|
|
3780
|
+
}>>;
|
|
3781
|
+
};
|
|
3782
|
+
};
|
|
3783
|
+
};
|
|
3784
|
+
enchantedLink: {
|
|
3785
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3786
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3787
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
3788
|
+
customClaims?: Record<string, any>;
|
|
3789
|
+
templateId?: string;
|
|
3790
|
+
templateOptions?: {
|
|
3791
|
+
[x: string]: string;
|
|
3792
|
+
};
|
|
3793
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3794
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
3795
|
+
email?: string;
|
|
3796
|
+
name?: string;
|
|
3797
|
+
givenName?: string;
|
|
3798
|
+
middleName?: string;
|
|
3799
|
+
familyName?: string;
|
|
3800
|
+
phone?: string;
|
|
3801
|
+
}, signUpOptions?: {
|
|
3802
|
+
customClaims?: Record<string, any>;
|
|
3803
|
+
templateId?: string;
|
|
3804
|
+
templateOptions?: {
|
|
3805
|
+
[x: string]: string;
|
|
3806
|
+
};
|
|
3807
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3808
|
+
waitForSession: (pendingRef: string, config?: {
|
|
3809
|
+
pollingIntervalMs: number;
|
|
3810
|
+
timeoutMs: number;
|
|
3811
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3812
|
+
update: {
|
|
3813
|
+
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3814
|
+
addToLoginIDs?: T_4;
|
|
3815
|
+
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
3816
|
+
templateOptions?: {
|
|
3817
|
+
[x: string]: string;
|
|
3818
|
+
};
|
|
3819
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3820
|
+
};
|
|
3821
|
+
};
|
|
3822
|
+
oauth: {
|
|
3823
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
3824
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3825
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3826
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3827
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3828
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3829
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3830
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3831
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3832
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3833
|
+
};
|
|
3834
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3835
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3836
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3837
|
+
getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3838
|
+
clientId: string;
|
|
3839
|
+
}>>;
|
|
3840
|
+
verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3841
|
+
code: string;
|
|
3842
|
+
}>>;
|
|
3843
|
+
exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3844
|
+
};
|
|
3845
|
+
saml: {
|
|
3846
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3847
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3848
|
+
};
|
|
3849
|
+
totp: {
|
|
3850
|
+
signUp: (loginId: string, user?: {
|
|
3851
|
+
email?: string;
|
|
3852
|
+
name?: string;
|
|
3853
|
+
givenName?: string;
|
|
3854
|
+
middleName?: string;
|
|
3855
|
+
familyName?: string;
|
|
3856
|
+
phone?: string;
|
|
3857
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
3858
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3859
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
3860
|
+
};
|
|
3861
|
+
notp: {
|
|
3862
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
3863
|
+
customClaims?: Record<string, any>;
|
|
3864
|
+
templateId?: string;
|
|
3865
|
+
templateOptions?: {
|
|
3866
|
+
[x: string]: string;
|
|
3867
|
+
};
|
|
3868
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3869
|
+
pendingRef: string;
|
|
3870
|
+
redirectUrl: string;
|
|
3871
|
+
image: string;
|
|
3872
|
+
}>>;
|
|
3873
|
+
signUp: (loginId?: string, user?: {
|
|
3874
|
+
email?: string;
|
|
3875
|
+
name?: string;
|
|
3876
|
+
givenName?: string;
|
|
3877
|
+
middleName?: string;
|
|
3878
|
+
familyName?: string;
|
|
3879
|
+
phone?: string;
|
|
3880
|
+
}, signUpOptions?: {
|
|
3881
|
+
customClaims?: Record<string, any>;
|
|
3882
|
+
templateId?: string;
|
|
3883
|
+
templateOptions?: {
|
|
3884
|
+
[x: string]: string;
|
|
3885
|
+
};
|
|
3886
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3887
|
+
pendingRef: string;
|
|
3888
|
+
redirectUrl: string;
|
|
3889
|
+
image: string;
|
|
3890
|
+
}>>;
|
|
3891
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3892
|
+
pendingRef: string;
|
|
3893
|
+
redirectUrl: string;
|
|
3894
|
+
image: string;
|
|
3895
|
+
}>>;
|
|
3896
|
+
waitForSession: (pendingRef: string, config?: {
|
|
3897
|
+
pollingIntervalMs: number;
|
|
3898
|
+
timeoutMs: number;
|
|
3899
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3900
|
+
};
|
|
3901
|
+
password: {
|
|
3902
|
+
signUp: (loginId: string, password: string, user?: {
|
|
3903
|
+
email?: string;
|
|
3904
|
+
name?: string;
|
|
3905
|
+
givenName?: string;
|
|
3906
|
+
middleName?: string;
|
|
3907
|
+
familyName?: string;
|
|
3908
|
+
phone?: string;
|
|
3909
|
+
}, signUpOptions?: {
|
|
3910
|
+
customClaims?: Record<string, any>;
|
|
3911
|
+
templateId?: string;
|
|
3912
|
+
templateOptions?: {
|
|
3913
|
+
[x: string]: string;
|
|
3914
|
+
};
|
|
3915
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3916
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3917
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
3918
|
+
[x: string]: string;
|
|
3919
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3920
|
+
resetMethod: string;
|
|
3921
|
+
pendingRef?: string;
|
|
3922
|
+
linkId?: string;
|
|
3923
|
+
maskedEmail: string;
|
|
3924
|
+
}>>;
|
|
3925
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3926
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3927
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3928
|
+
minLength: number;
|
|
3929
|
+
lowercase: boolean;
|
|
3930
|
+
uppercase: boolean;
|
|
3931
|
+
number: boolean;
|
|
3932
|
+
nonAlphanumeric: boolean;
|
|
3933
|
+
}>>;
|
|
3934
|
+
};
|
|
3935
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2498
3936
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2499
3937
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2500
3938
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
@@ -2565,6 +4003,7 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
|
|
|
2565
4003
|
}) & {
|
|
2566
4004
|
getRefreshToken: () => string;
|
|
2567
4005
|
getSessionToken: () => string;
|
|
4006
|
+
getIdToken: () => string;
|
|
2568
4007
|
};
|
|
2569
4008
|
|
|
2570
|
-
export { type CookieConfig, type OneTapConfig, REFRESH_TOKEN_KEY, SESSION_TOKEN_KEY, clearFingerprintData, decoratedCreateSdk as default, ensureFingerprintIds };
|
|
4009
|
+
export { type CookieConfig, type OidcConfig, type OneTapConfig, REFRESH_TOKEN_KEY, SESSION_TOKEN_KEY, clearFingerprintData, decoratedCreateSdk as default, ensureFingerprintIds, hasOidcParamsInUrl };
|