@descope/react-sdk 2.0.4 → 2.0.6
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/README.md +21 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/examples/app/ManageUsers.d.ts +3 -0
- package/dist/index.d.ts +253 -173
- 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 +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { FC, DOMAttributes } from 'react';
|
|
2
2
|
import DescopeWc, { ILogger, ThemeOptions, AutoFocusOptions } from '@descope/web-component';
|
|
3
3
|
export { ILogger } from '@descope/web-component';
|
|
4
|
+
import UserManagementWidget from '@descope/user-management-widget';
|
|
5
|
+
import * as _descope_web_js_sdk from '@descope/web-js-sdk';
|
|
4
6
|
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
5
7
|
|
|
6
8
|
interface IAuthProviderProps {
|
|
@@ -78,9 +80,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
78
80
|
samlIdpStateId?: string;
|
|
79
81
|
samlIdpUsername?: string;
|
|
80
82
|
ssoAppId?: string;
|
|
83
|
+
oidcLoginHint?: string;
|
|
81
84
|
abTestingKey?: number;
|
|
85
|
+
startOptionsVersion?: number;
|
|
82
86
|
client?: Record<string, any>;
|
|
83
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "preview" | "abTestingKey" | "client"> & {
|
|
87
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
84
88
|
lastAuth?: Omit<{
|
|
85
89
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
86
90
|
oauthProvider?: string;
|
|
@@ -104,11 +108,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
104
108
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
105
109
|
};
|
|
106
110
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
107
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
108
|
-
stepup?: boolean;
|
|
109
|
-
mfa?: boolean;
|
|
110
|
-
customClaims?: Record<string, any>;
|
|
111
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
111
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
112
112
|
transactionId: string;
|
|
113
113
|
options: string;
|
|
114
114
|
create: boolean;
|
|
@@ -137,6 +137,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
137
137
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
138
138
|
};
|
|
139
139
|
};
|
|
140
|
+
fedcm: {
|
|
141
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
142
|
+
};
|
|
140
143
|
accessKey: {
|
|
141
144
|
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
142
145
|
};
|
|
@@ -147,13 +150,13 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
147
150
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
148
151
|
};
|
|
149
152
|
signIn: {
|
|
150
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
153
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
151
154
|
maskedPhone: string;
|
|
152
155
|
}>>;
|
|
153
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
156
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
154
157
|
maskedPhone: string;
|
|
155
158
|
}>>;
|
|
156
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
159
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
157
160
|
maskedEmail: string;
|
|
158
161
|
}>>;
|
|
159
162
|
};
|
|
@@ -165,6 +168,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
165
168
|
middleName?: string;
|
|
166
169
|
familyName?: string;
|
|
167
170
|
phone?: string;
|
|
171
|
+
}, signUpOptions?: {
|
|
172
|
+
customClaims?: Record<string, any>;
|
|
173
|
+
templateOptions?: {
|
|
174
|
+
[x: string]: string;
|
|
175
|
+
};
|
|
168
176
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
169
177
|
maskedPhone: string;
|
|
170
178
|
}>>;
|
|
@@ -175,6 +183,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
175
183
|
middleName?: string;
|
|
176
184
|
familyName?: string;
|
|
177
185
|
phone?: string;
|
|
186
|
+
}, signUpOptions?: {
|
|
187
|
+
customClaims?: Record<string, any>;
|
|
188
|
+
templateOptions?: {
|
|
189
|
+
[x: string]: string;
|
|
190
|
+
};
|
|
178
191
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
179
192
|
maskedPhone: string;
|
|
180
193
|
}>>;
|
|
@@ -185,18 +198,23 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
185
198
|
middleName?: string;
|
|
186
199
|
familyName?: string;
|
|
187
200
|
phone?: string;
|
|
201
|
+
}, signUpOptions?: {
|
|
202
|
+
customClaims?: Record<string, any>;
|
|
203
|
+
templateOptions?: {
|
|
204
|
+
[x: string]: string;
|
|
205
|
+
};
|
|
188
206
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
189
207
|
maskedEmail: string;
|
|
190
208
|
}>>;
|
|
191
209
|
};
|
|
192
210
|
signUpOrIn: {
|
|
193
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
211
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
194
212
|
maskedPhone: string;
|
|
195
213
|
}>>;
|
|
196
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
214
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
197
215
|
maskedPhone: string;
|
|
198
216
|
}>>;
|
|
199
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
217
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
200
218
|
maskedEmail: string;
|
|
201
219
|
}>>;
|
|
202
220
|
};
|
|
@@ -204,6 +222,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
204
222
|
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
205
223
|
addToLoginIDs?: T;
|
|
206
224
|
onMergeUseExisting?: T extends true ? boolean : never;
|
|
225
|
+
templateOptions?: {
|
|
226
|
+
[x: string]: string;
|
|
227
|
+
};
|
|
207
228
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
208
229
|
maskedEmail: string;
|
|
209
230
|
}>>;
|
|
@@ -211,12 +232,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
211
232
|
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
212
233
|
addToLoginIDs?: T_1;
|
|
213
234
|
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
235
|
+
templateOptions?: {
|
|
236
|
+
[x: string]: string;
|
|
237
|
+
};
|
|
214
238
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
215
239
|
maskedPhone: string;
|
|
216
240
|
}>>;
|
|
217
241
|
whatsapp: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
218
242
|
addToLoginIDs?: T_1_1;
|
|
219
243
|
onMergeUseExisting?: T_1_1 extends true ? boolean : never;
|
|
244
|
+
templateOptions?: {
|
|
245
|
+
[x: string]: string;
|
|
246
|
+
};
|
|
220
247
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
221
248
|
maskedPhone: string;
|
|
222
249
|
}>>;
|
|
@@ -226,56 +253,86 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
226
253
|
magicLink: {
|
|
227
254
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
228
255
|
signIn: {
|
|
229
|
-
sms: (loginId: string,
|
|
256
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
230
257
|
maskedPhone: string;
|
|
231
258
|
}>>;
|
|
232
|
-
whatsapp: (loginId: string,
|
|
259
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
233
260
|
maskedPhone: string;
|
|
234
261
|
}>>;
|
|
235
|
-
email: (loginId: string,
|
|
262
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
236
263
|
maskedEmail: string;
|
|
237
264
|
}>>;
|
|
238
265
|
};
|
|
239
266
|
signUp: {
|
|
240
|
-
sms: (loginId: string,
|
|
267
|
+
sms: (loginId: string, URI: string, user?: {
|
|
241
268
|
email?: string;
|
|
242
269
|
name?: string;
|
|
243
270
|
givenName?: string;
|
|
244
271
|
middleName?: string;
|
|
245
272
|
familyName?: string;
|
|
246
273
|
phone?: string;
|
|
274
|
+
}, signUpOptions?: {
|
|
275
|
+
customClaims?: Record<string, any>;
|
|
276
|
+
templateOptions?: {
|
|
277
|
+
[x: string]: string;
|
|
278
|
+
};
|
|
247
279
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
248
280
|
maskedPhone: string;
|
|
249
281
|
}>>;
|
|
250
|
-
whatsapp: (loginId: string,
|
|
282
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
251
283
|
email?: string;
|
|
252
284
|
name?: string;
|
|
253
285
|
givenName?: string;
|
|
254
286
|
middleName?: string;
|
|
255
287
|
familyName?: string;
|
|
256
288
|
phone?: string;
|
|
289
|
+
}, signUpOptions?: {
|
|
290
|
+
customClaims?: Record<string, any>;
|
|
291
|
+
templateOptions?: {
|
|
292
|
+
[x: string]: string;
|
|
293
|
+
};
|
|
257
294
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
258
295
|
maskedPhone: string;
|
|
259
296
|
}>>;
|
|
260
|
-
email: (loginId: string,
|
|
297
|
+
email: (loginId: string, URI: string, user?: {
|
|
261
298
|
email?: string;
|
|
262
299
|
name?: string;
|
|
263
300
|
givenName?: string;
|
|
264
301
|
middleName?: string;
|
|
265
302
|
familyName?: string;
|
|
266
303
|
phone?: string;
|
|
304
|
+
}, signUpOptions?: {
|
|
305
|
+
customClaims?: Record<string, any>;
|
|
306
|
+
templateOptions?: {
|
|
307
|
+
[x: string]: string;
|
|
308
|
+
};
|
|
267
309
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
268
310
|
maskedEmail: string;
|
|
269
311
|
}>>;
|
|
270
312
|
};
|
|
271
313
|
signUpOrIn: {
|
|
272
|
-
sms: (loginId: string,
|
|
314
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
315
|
+
customClaims?: Record<string, any>;
|
|
316
|
+
templateOptions?: {
|
|
317
|
+
[x: string]: string;
|
|
318
|
+
};
|
|
319
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
273
320
|
maskedPhone: string;
|
|
274
321
|
}>>;
|
|
275
|
-
whatsapp: (loginId: string,
|
|
322
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
323
|
+
customClaims?: Record<string, any>;
|
|
324
|
+
templateOptions?: {
|
|
325
|
+
[x: string]: string;
|
|
326
|
+
};
|
|
327
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
276
328
|
maskedPhone: string;
|
|
277
329
|
}>>;
|
|
278
|
-
email: (loginId: string,
|
|
330
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
331
|
+
customClaims?: Record<string, any>;
|
|
332
|
+
templateOptions?: {
|
|
333
|
+
[x: string]: string;
|
|
334
|
+
};
|
|
335
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
279
336
|
maskedEmail: string;
|
|
280
337
|
}>>;
|
|
281
338
|
};
|
|
@@ -283,6 +340,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
283
340
|
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
284
341
|
addToLoginIDs?: T_2;
|
|
285
342
|
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
343
|
+
templateOptions?: {
|
|
344
|
+
[x: string]: string;
|
|
345
|
+
};
|
|
286
346
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
287
347
|
maskedEmail: string;
|
|
288
348
|
}>>;
|
|
@@ -290,12 +350,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
290
350
|
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
291
351
|
addToLoginIDs?: T_3;
|
|
292
352
|
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
353
|
+
templateOptions?: {
|
|
354
|
+
[x: string]: string;
|
|
355
|
+
};
|
|
293
356
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
294
357
|
maskedPhone: string;
|
|
295
358
|
}>>;
|
|
296
359
|
whatsapp: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
297
360
|
addToLoginIDs?: T_3_1;
|
|
298
361
|
onMergeUseExisting?: T_3_1 extends true ? boolean : never;
|
|
362
|
+
templateOptions?: {
|
|
363
|
+
[x: string]: string;
|
|
364
|
+
};
|
|
299
365
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
300
366
|
maskedPhone: string;
|
|
301
367
|
}>>;
|
|
@@ -304,15 +370,25 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
304
370
|
};
|
|
305
371
|
enchantedLink: {
|
|
306
372
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
307
|
-
signIn: (loginId: string,
|
|
308
|
-
signUpOrIn: (loginId: string,
|
|
309
|
-
|
|
373
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
374
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
375
|
+
customClaims?: Record<string, any>;
|
|
376
|
+
templateOptions?: {
|
|
377
|
+
[x: string]: string;
|
|
378
|
+
};
|
|
379
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
380
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
310
381
|
email?: string;
|
|
311
382
|
name?: string;
|
|
312
383
|
givenName?: string;
|
|
313
384
|
middleName?: string;
|
|
314
385
|
familyName?: string;
|
|
315
386
|
phone?: string;
|
|
387
|
+
}, signUpOptions?: {
|
|
388
|
+
customClaims?: Record<string, any>;
|
|
389
|
+
templateOptions?: {
|
|
390
|
+
[x: string]: string;
|
|
391
|
+
};
|
|
316
392
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
317
393
|
waitForSession: (pendingRef: string, config?: {
|
|
318
394
|
pollingIntervalMs: number;
|
|
@@ -322,69 +398,30 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
322
398
|
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
323
399
|
addToLoginIDs?: T_4;
|
|
324
400
|
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
401
|
+
templateOptions?: {
|
|
402
|
+
[x: string]: string;
|
|
403
|
+
};
|
|
325
404
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
326
405
|
};
|
|
327
406
|
};
|
|
328
407
|
oauth: {
|
|
329
|
-
start: ((provider: string, redirectUrl?: string, loginOptions?: {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
github: (redirectURL?: string, loginOptions?: {
|
|
340
|
-
stepup?: boolean;
|
|
341
|
-
mfa?: boolean;
|
|
342
|
-
customClaims?: Record<string, any>;
|
|
343
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
344
|
-
google: (redirectURL?: string, loginOptions?: {
|
|
345
|
-
stepup?: boolean;
|
|
346
|
-
mfa?: boolean;
|
|
347
|
-
customClaims?: Record<string, any>;
|
|
348
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
349
|
-
microsoft: (redirectURL?: string, loginOptions?: {
|
|
350
|
-
stepup?: boolean;
|
|
351
|
-
mfa?: boolean;
|
|
352
|
-
customClaims?: Record<string, any>;
|
|
353
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
354
|
-
gitlab: (redirectURL?: string, loginOptions?: {
|
|
355
|
-
stepup?: boolean;
|
|
356
|
-
mfa?: boolean;
|
|
357
|
-
customClaims?: Record<string, any>;
|
|
358
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
359
|
-
apple: (redirectURL?: string, loginOptions?: {
|
|
360
|
-
stepup?: boolean;
|
|
361
|
-
mfa?: boolean;
|
|
362
|
-
customClaims?: Record<string, any>;
|
|
363
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
364
|
-
discord: (redirectURL?: string, loginOptions?: {
|
|
365
|
-
stepup?: boolean;
|
|
366
|
-
mfa?: boolean;
|
|
367
|
-
customClaims?: Record<string, any>;
|
|
368
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
369
|
-
linkedin: (redirectURL?: string, loginOptions?: {
|
|
370
|
-
stepup?: boolean;
|
|
371
|
-
mfa?: boolean;
|
|
372
|
-
customClaims?: Record<string, any>;
|
|
373
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
374
|
-
slack: (redirectURL?: string, loginOptions?: {
|
|
375
|
-
stepup?: boolean;
|
|
376
|
-
mfa?: boolean;
|
|
377
|
-
customClaims?: Record<string, any>;
|
|
378
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
408
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
409
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
410
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
411
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
412
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
413
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
414
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
415
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
416
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
417
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
379
418
|
};
|
|
380
419
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
420
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
421
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
381
422
|
};
|
|
382
423
|
saml: {
|
|
383
|
-
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?:
|
|
384
|
-
stepup?: boolean;
|
|
385
|
-
mfa?: boolean;
|
|
386
|
-
customClaims?: Record<string, any>;
|
|
387
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
424
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
388
425
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
389
426
|
};
|
|
390
427
|
totp: {
|
|
@@ -396,11 +433,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
396
433
|
familyName?: string;
|
|
397
434
|
phone?: string;
|
|
398
435
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
399
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
400
|
-
stepup?: boolean;
|
|
401
|
-
mfa?: boolean;
|
|
402
|
-
customClaims?: Record<string, any>;
|
|
403
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
436
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
404
437
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
405
438
|
};
|
|
406
439
|
password: {
|
|
@@ -413,7 +446,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
413
446
|
phone?: string;
|
|
414
447
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
415
448
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
416
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
449
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
450
|
+
[x: string]: string;
|
|
451
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
417
452
|
resetMethod: string;
|
|
418
453
|
pendingRef?: string;
|
|
419
454
|
linkId?: string;
|
|
@@ -434,6 +469,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
434
469
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
435
470
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
436
471
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
472
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
437
473
|
isJwtExpired: (token: string) => boolean;
|
|
438
474
|
getTenants: (token: string) => string[];
|
|
439
475
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
@@ -496,9 +532,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
496
532
|
samlIdpStateId?: string;
|
|
497
533
|
samlIdpUsername?: string;
|
|
498
534
|
ssoAppId?: string;
|
|
535
|
+
oidcLoginHint?: string;
|
|
499
536
|
abTestingKey?: number;
|
|
537
|
+
startOptionsVersion?: number;
|
|
500
538
|
client?: Record<string, any>;
|
|
501
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "preview" | "abTestingKey" | "client"> & {
|
|
539
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
502
540
|
lastAuth?: Omit<{
|
|
503
541
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
504
542
|
oauthProvider?: string;
|
|
@@ -522,11 +560,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
522
560
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
523
561
|
};
|
|
524
562
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
525
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
526
|
-
stepup?: boolean;
|
|
527
|
-
mfa?: boolean;
|
|
528
|
-
customClaims?: Record<string, any>;
|
|
529
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
563
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
530
564
|
transactionId: string;
|
|
531
565
|
options: string;
|
|
532
566
|
create: boolean;
|
|
@@ -555,6 +589,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
555
589
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
556
590
|
};
|
|
557
591
|
};
|
|
592
|
+
fedcm: {
|
|
593
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
594
|
+
};
|
|
558
595
|
accessKey: {
|
|
559
596
|
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
560
597
|
};
|
|
@@ -565,13 +602,13 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
565
602
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
566
603
|
};
|
|
567
604
|
signIn: {
|
|
568
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
605
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
569
606
|
maskedPhone: string;
|
|
570
607
|
}>>;
|
|
571
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
608
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
572
609
|
maskedPhone: string;
|
|
573
610
|
}>>;
|
|
574
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
611
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
575
612
|
maskedEmail: string;
|
|
576
613
|
}>>;
|
|
577
614
|
};
|
|
@@ -583,6 +620,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
583
620
|
middleName?: string;
|
|
584
621
|
familyName?: string;
|
|
585
622
|
phone?: string;
|
|
623
|
+
}, signUpOptions?: {
|
|
624
|
+
customClaims?: Record<string, any>;
|
|
625
|
+
templateOptions?: {
|
|
626
|
+
[x: string]: string;
|
|
627
|
+
};
|
|
586
628
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
587
629
|
maskedPhone: string;
|
|
588
630
|
}>>;
|
|
@@ -593,6 +635,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
593
635
|
middleName?: string;
|
|
594
636
|
familyName?: string;
|
|
595
637
|
phone?: string;
|
|
638
|
+
}, signUpOptions?: {
|
|
639
|
+
customClaims?: Record<string, any>;
|
|
640
|
+
templateOptions?: {
|
|
641
|
+
[x: string]: string;
|
|
642
|
+
};
|
|
596
643
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
597
644
|
maskedPhone: string;
|
|
598
645
|
}>>;
|
|
@@ -603,18 +650,23 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
603
650
|
middleName?: string;
|
|
604
651
|
familyName?: string;
|
|
605
652
|
phone?: string;
|
|
653
|
+
}, signUpOptions?: {
|
|
654
|
+
customClaims?: Record<string, any>;
|
|
655
|
+
templateOptions?: {
|
|
656
|
+
[x: string]: string;
|
|
657
|
+
};
|
|
606
658
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
607
659
|
maskedEmail: string;
|
|
608
660
|
}>>;
|
|
609
661
|
};
|
|
610
662
|
signUpOrIn: {
|
|
611
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
663
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
612
664
|
maskedPhone: string;
|
|
613
665
|
}>>;
|
|
614
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
666
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
615
667
|
maskedPhone: string;
|
|
616
668
|
}>>;
|
|
617
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
669
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
618
670
|
maskedEmail: string;
|
|
619
671
|
}>>;
|
|
620
672
|
};
|
|
@@ -622,6 +674,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
622
674
|
email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
623
675
|
addToLoginIDs?: T_5;
|
|
624
676
|
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
677
|
+
templateOptions?: {
|
|
678
|
+
[x: string]: string;
|
|
679
|
+
};
|
|
625
680
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
626
681
|
maskedEmail: string;
|
|
627
682
|
}>>;
|
|
@@ -629,12 +684,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
629
684
|
sms: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
630
685
|
addToLoginIDs?: T_1_2;
|
|
631
686
|
onMergeUseExisting?: T_1_2 extends true ? boolean : never;
|
|
687
|
+
templateOptions?: {
|
|
688
|
+
[x: string]: string;
|
|
689
|
+
};
|
|
632
690
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
633
691
|
maskedPhone: string;
|
|
634
692
|
}>>;
|
|
635
693
|
whatsapp: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
636
694
|
addToLoginIDs?: T_1_3;
|
|
637
695
|
onMergeUseExisting?: T_1_3 extends true ? boolean : never;
|
|
696
|
+
templateOptions?: {
|
|
697
|
+
[x: string]: string;
|
|
698
|
+
};
|
|
638
699
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
639
700
|
maskedPhone: string;
|
|
640
701
|
}>>;
|
|
@@ -644,56 +705,86 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
644
705
|
magicLink: {
|
|
645
706
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
646
707
|
signIn: {
|
|
647
|
-
sms: (loginId: string,
|
|
708
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
648
709
|
maskedPhone: string;
|
|
649
710
|
}>>;
|
|
650
|
-
whatsapp: (loginId: string,
|
|
711
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
651
712
|
maskedPhone: string;
|
|
652
713
|
}>>;
|
|
653
|
-
email: (loginId: string,
|
|
714
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
654
715
|
maskedEmail: string;
|
|
655
716
|
}>>;
|
|
656
717
|
};
|
|
657
718
|
signUp: {
|
|
658
|
-
sms: (loginId: string,
|
|
719
|
+
sms: (loginId: string, URI: string, user?: {
|
|
659
720
|
email?: string;
|
|
660
721
|
name?: string;
|
|
661
722
|
givenName?: string;
|
|
662
723
|
middleName?: string;
|
|
663
724
|
familyName?: string;
|
|
664
725
|
phone?: string;
|
|
726
|
+
}, signUpOptions?: {
|
|
727
|
+
customClaims?: Record<string, any>;
|
|
728
|
+
templateOptions?: {
|
|
729
|
+
[x: string]: string;
|
|
730
|
+
};
|
|
665
731
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
666
732
|
maskedPhone: string;
|
|
667
733
|
}>>;
|
|
668
|
-
whatsapp: (loginId: string,
|
|
734
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
669
735
|
email?: string;
|
|
670
736
|
name?: string;
|
|
671
737
|
givenName?: string;
|
|
672
738
|
middleName?: string;
|
|
673
739
|
familyName?: string;
|
|
674
740
|
phone?: string;
|
|
741
|
+
}, signUpOptions?: {
|
|
742
|
+
customClaims?: Record<string, any>;
|
|
743
|
+
templateOptions?: {
|
|
744
|
+
[x: string]: string;
|
|
745
|
+
};
|
|
675
746
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
676
747
|
maskedPhone: string;
|
|
677
748
|
}>>;
|
|
678
|
-
email: (loginId: string,
|
|
749
|
+
email: (loginId: string, URI: string, user?: {
|
|
679
750
|
email?: string;
|
|
680
751
|
name?: string;
|
|
681
752
|
givenName?: string;
|
|
682
753
|
middleName?: string;
|
|
683
754
|
familyName?: string;
|
|
684
755
|
phone?: string;
|
|
756
|
+
}, signUpOptions?: {
|
|
757
|
+
customClaims?: Record<string, any>;
|
|
758
|
+
templateOptions?: {
|
|
759
|
+
[x: string]: string;
|
|
760
|
+
};
|
|
685
761
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
686
762
|
maskedEmail: string;
|
|
687
763
|
}>>;
|
|
688
764
|
};
|
|
689
765
|
signUpOrIn: {
|
|
690
|
-
sms: (loginId: string,
|
|
766
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
767
|
+
customClaims?: Record<string, any>;
|
|
768
|
+
templateOptions?: {
|
|
769
|
+
[x: string]: string;
|
|
770
|
+
};
|
|
771
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
691
772
|
maskedPhone: string;
|
|
692
773
|
}>>;
|
|
693
|
-
whatsapp: (loginId: string,
|
|
774
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
775
|
+
customClaims?: Record<string, any>;
|
|
776
|
+
templateOptions?: {
|
|
777
|
+
[x: string]: string;
|
|
778
|
+
};
|
|
779
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
694
780
|
maskedPhone: string;
|
|
695
781
|
}>>;
|
|
696
|
-
email: (loginId: string,
|
|
782
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
783
|
+
customClaims?: Record<string, any>;
|
|
784
|
+
templateOptions?: {
|
|
785
|
+
[x: string]: string;
|
|
786
|
+
};
|
|
787
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
697
788
|
maskedEmail: string;
|
|
698
789
|
}>>;
|
|
699
790
|
};
|
|
@@ -701,6 +792,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
701
792
|
email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
702
793
|
addToLoginIDs?: T_2_1;
|
|
703
794
|
onMergeUseExisting?: T_2_1 extends true ? boolean : never;
|
|
795
|
+
templateOptions?: {
|
|
796
|
+
[x: string]: string;
|
|
797
|
+
};
|
|
704
798
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
705
799
|
maskedEmail: string;
|
|
706
800
|
}>>;
|
|
@@ -708,12 +802,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
708
802
|
sms: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
709
803
|
addToLoginIDs?: T_3_2;
|
|
710
804
|
onMergeUseExisting?: T_3_2 extends true ? boolean : never;
|
|
805
|
+
templateOptions?: {
|
|
806
|
+
[x: string]: string;
|
|
807
|
+
};
|
|
711
808
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
712
809
|
maskedPhone: string;
|
|
713
810
|
}>>;
|
|
714
811
|
whatsapp: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
715
812
|
addToLoginIDs?: T_3_3;
|
|
716
813
|
onMergeUseExisting?: T_3_3 extends true ? boolean : never;
|
|
814
|
+
templateOptions?: {
|
|
815
|
+
[x: string]: string;
|
|
816
|
+
};
|
|
717
817
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
718
818
|
maskedPhone: string;
|
|
719
819
|
}>>;
|
|
@@ -722,15 +822,25 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
722
822
|
};
|
|
723
823
|
enchantedLink: {
|
|
724
824
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
725
|
-
signIn: (loginId: string,
|
|
726
|
-
signUpOrIn: (loginId: string,
|
|
727
|
-
|
|
825
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
826
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
827
|
+
customClaims?: Record<string, any>;
|
|
828
|
+
templateOptions?: {
|
|
829
|
+
[x: string]: string;
|
|
830
|
+
};
|
|
831
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
832
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
728
833
|
email?: string;
|
|
729
834
|
name?: string;
|
|
730
835
|
givenName?: string;
|
|
731
836
|
middleName?: string;
|
|
732
837
|
familyName?: string;
|
|
733
838
|
phone?: string;
|
|
839
|
+
}, signUpOptions?: {
|
|
840
|
+
customClaims?: Record<string, any>;
|
|
841
|
+
templateOptions?: {
|
|
842
|
+
[x: string]: string;
|
|
843
|
+
};
|
|
734
844
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
735
845
|
waitForSession: (pendingRef: string, config?: {
|
|
736
846
|
pollingIntervalMs: number;
|
|
@@ -740,69 +850,30 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
740
850
|
email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
741
851
|
addToLoginIDs?: T_4_1;
|
|
742
852
|
onMergeUseExisting?: T_4_1 extends true ? boolean : never;
|
|
853
|
+
templateOptions?: {
|
|
854
|
+
[x: string]: string;
|
|
855
|
+
};
|
|
743
856
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
744
857
|
};
|
|
745
858
|
};
|
|
746
859
|
oauth: {
|
|
747
|
-
start: ((provider: string, redirectUrl?: string, loginOptions?: {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
github: (redirectURL?: string, loginOptions?: {
|
|
758
|
-
stepup?: boolean;
|
|
759
|
-
mfa?: boolean;
|
|
760
|
-
customClaims?: Record<string, any>;
|
|
761
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
762
|
-
google: (redirectURL?: string, loginOptions?: {
|
|
763
|
-
stepup?: boolean;
|
|
764
|
-
mfa?: boolean;
|
|
765
|
-
customClaims?: Record<string, any>;
|
|
766
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
767
|
-
microsoft: (redirectURL?: string, loginOptions?: {
|
|
768
|
-
stepup?: boolean;
|
|
769
|
-
mfa?: boolean;
|
|
770
|
-
customClaims?: Record<string, any>;
|
|
771
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
772
|
-
gitlab: (redirectURL?: string, loginOptions?: {
|
|
773
|
-
stepup?: boolean;
|
|
774
|
-
mfa?: boolean;
|
|
775
|
-
customClaims?: Record<string, any>;
|
|
776
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
777
|
-
apple: (redirectURL?: string, loginOptions?: {
|
|
778
|
-
stepup?: boolean;
|
|
779
|
-
mfa?: boolean;
|
|
780
|
-
customClaims?: Record<string, any>;
|
|
781
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
782
|
-
discord: (redirectURL?: string, loginOptions?: {
|
|
783
|
-
stepup?: boolean;
|
|
784
|
-
mfa?: boolean;
|
|
785
|
-
customClaims?: Record<string, any>;
|
|
786
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
787
|
-
linkedin: (redirectURL?: string, loginOptions?: {
|
|
788
|
-
stepup?: boolean;
|
|
789
|
-
mfa?: boolean;
|
|
790
|
-
customClaims?: Record<string, any>;
|
|
791
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
792
|
-
slack: (redirectURL?: string, loginOptions?: {
|
|
793
|
-
stepup?: boolean;
|
|
794
|
-
mfa?: boolean;
|
|
795
|
-
customClaims?: Record<string, any>;
|
|
796
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
860
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
861
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
862
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
863
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
864
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
865
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
866
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
867
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
868
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
869
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
797
870
|
};
|
|
798
871
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
872
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
873
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
799
874
|
};
|
|
800
875
|
saml: {
|
|
801
|
-
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?:
|
|
802
|
-
stepup?: boolean;
|
|
803
|
-
mfa?: boolean;
|
|
804
|
-
customClaims?: Record<string, any>;
|
|
805
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
876
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
806
877
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
807
878
|
};
|
|
808
879
|
totp: {
|
|
@@ -814,11 +885,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
814
885
|
familyName?: string;
|
|
815
886
|
phone?: string;
|
|
816
887
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
817
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
818
|
-
stepup?: boolean;
|
|
819
|
-
mfa?: boolean;
|
|
820
|
-
customClaims?: Record<string, any>;
|
|
821
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
888
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
822
889
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
823
890
|
};
|
|
824
891
|
password: {
|
|
@@ -831,7 +898,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
831
898
|
phone?: string;
|
|
832
899
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
833
900
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
834
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
901
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
902
|
+
[x: string]: string;
|
|
903
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
835
904
|
resetMethod: string;
|
|
836
905
|
pendingRef?: string;
|
|
837
906
|
linkId?: string;
|
|
@@ -852,6 +921,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
852
921
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
853
922
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
854
923
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
924
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
855
925
|
isJwtExpired: (token: string) => boolean;
|
|
856
926
|
getTenants: (token: string) => string[];
|
|
857
927
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
@@ -910,6 +980,7 @@ declare global {
|
|
|
910
980
|
namespace JSX {
|
|
911
981
|
interface IntrinsicElements {
|
|
912
982
|
['descope-wc']: DescopeCustomElement;
|
|
983
|
+
['descope-user-management-widget']: UserManagementCustomElement;
|
|
913
984
|
}
|
|
914
985
|
}
|
|
915
986
|
}
|
|
@@ -922,7 +993,8 @@ type CustomElement<T, K extends string = ''> = Partial<T & DOMAttributes<T> & {
|
|
|
922
993
|
ref: React.Ref<HTMLElement>;
|
|
923
994
|
} & CustomEvents<`on${K}`>>;
|
|
924
995
|
type DescopeCustomElement = CustomElement<DescopeWc, 'success' | 'error'>;
|
|
925
|
-
|
|
996
|
+
type UserManagementCustomElement = CustomElement<typeof UserManagementWidget & UserManagementProps>;
|
|
997
|
+
type DescopeProps = {
|
|
926
998
|
flowId: string;
|
|
927
999
|
onSuccess?: DescopeCustomElement['onsuccess'];
|
|
928
1000
|
onError?: DescopeCustomElement['onerror'];
|
|
@@ -940,7 +1012,13 @@ interface DescopeProps {
|
|
|
940
1012
|
}) => string;
|
|
941
1013
|
form?: Record<string, any>;
|
|
942
1014
|
client?: Record<string, any>;
|
|
943
|
-
}
|
|
1015
|
+
};
|
|
1016
|
+
type UserManagementProps = {
|
|
1017
|
+
logger?: ILogger;
|
|
1018
|
+
tenant: string;
|
|
1019
|
+
theme?: ThemeOptions;
|
|
1020
|
+
debug?: boolean;
|
|
1021
|
+
};
|
|
944
1022
|
|
|
945
1023
|
type DefaultFlowProps = Omit<DescopeProps, 'flowId'>;
|
|
946
1024
|
|
|
@@ -950,6 +1028,8 @@ declare const SignUpOrInFlow: (props: DefaultFlowProps) => React.JSX.Element;
|
|
|
950
1028
|
|
|
951
1029
|
declare const Descope: React.ForwardRefExoticComponent<DescopeProps & React.RefAttributes<HTMLElement>>;
|
|
952
1030
|
|
|
1031
|
+
declare const UserManagement: React.ForwardRefExoticComponent<UserManagementProps & React.RefAttributes<HTMLElement>>;
|
|
1032
|
+
|
|
953
1033
|
declare const useDescope: () => Sdk;
|
|
954
1034
|
|
|
955
1035
|
declare const useSession: () => {
|
|
@@ -963,4 +1043,4 @@ declare const useUser: () => {
|
|
|
963
1043
|
user: _descope_core_js_sdk.UserResponse;
|
|
964
1044
|
};
|
|
965
1045
|
|
|
966
|
-
export { AuthProvider, Descope, SignInFlow, SignUpFlow, SignUpOrInFlow, getJwtPermissions, getJwtRoles, getRefreshToken, getSessionToken, refresh, useDescope, useSession, useUser };
|
|
1046
|
+
export { AuthProvider, Descope, SignInFlow, SignUpFlow, SignUpOrInFlow, UserManagement, getJwtPermissions, getJwtRoles, getRefreshToken, getSessionToken, refresh, useDescope, useSession, useUser };
|