1 |
|
2 |
|
3 | export as namespace auth0;
|
4 |
|
5 | export class Authentication {
|
6 | constructor(options: AuthOptions);
|
7 |
|
8 | passwordless: PasswordlessAuthentication;
|
9 | dbConnection: DBConnection;
|
10 |
|
11 | /**
|
12 | * Builds and returns the `/authorize` url in order to initialize a new authN/authZ transaction
|
13 | *
|
14 | * @param options: https://auth0.github.io/auth0.js/global.html#buildAuthorizeUrl
|
15 | * @see {@link https:
|
16 | * @see {@link https:
|
17 | */
|
18 | buildAuthorizeUrl(options: AuthorizeUrlOptions): string;
|
19 |
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 | buildLogoutUrl(options?: LogoutOptions): string;
|
26 |
|
27 | |
28 |
|
29 |
|
30 |
|
31 |
|
32 | loginWithDefaultDirectory(options: DefaultDirectoryLoginOptions, callback: Auth0Callback<any>): void;
|
33 |
|
34 | |
35 |
|
36 |
|
37 |
|
38 | loginWithResourceOwner(options: ResourceOwnerLoginOptions, callback: Auth0Callback<any>): void;
|
39 |
|
40 | |
41 |
|
42 |
|
43 | login(options: DefaultLoginOptions, callback: Auth0Callback<any>): void;
|
44 |
|
45 | |
46 |
|
47 |
|
48 | oauthToken(options: any, callback: Auth0Callback<any>): void;
|
49 |
|
50 | |
51 |
|
52 |
|
53 | getSSOData(callback?: Auth0Callback<SsoDataResult | undefined>): void;
|
54 |
|
55 | |
56 |
|
57 |
|
58 | getSSOData(withActiveDirectories: boolean, callback?: Auth0Callback<SsoDataResult | undefined>): void;
|
59 |
|
60 | |
61 |
|
62 |
|
63 | userInfo(accessToken: string, callback: Auth0Callback<Auth0UserProfile>): void;
|
64 |
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 | delegation(options: DelegationOptions, callback: Auth0Callback<Auth0DelegationToken>): any;
|
71 |
|
72 | |
73 |
|
74 |
|
75 | getUserCountry(callback: Auth0Callback<{ countryCode: string }>): void;
|
76 | }
|
77 |
|
78 | export class PasswordlessAuthentication {
|
79 | constructor(request: any, option: any);
|
80 |
|
81 | /**
|
82 | * Builds and returns the passwordless TOTP verify url in order to initialize a new authN/authZ transaction
|
83 | */
|
84 | buildVerifyUrl(options: PasswordlessVerifyOptions): string;
|
85 |
|
86 | /**
|
87 | * Initializes a new passwordless authN/authZ transaction
|
88 | *
|
89 | * @param options: https://auth0.com/docs/api/authentication#passwordless
|
90 | */
|
91 | start(options: PasswordlessStartOptions, callback: Auth0Callback<any>): void;
|
92 |
|
93 | /**
|
94 | * Verifies the passwordless TOTP and returns an error if any.
|
95 | */
|
96 | verify(options: PasswordlessVerifyOptions, callback: Auth0Callback<any>): void;
|
97 | }
|
98 |
|
99 | export class DBConnection {
|
100 | constructor(request: any, option: any);
|
101 |
|
102 | /**
|
103 | * Creates a new user in a Auth0 Database connection
|
104 | * @param options https://auth0.com/docs/api/authentication#signup
|
105 | */
|
106 | signup(options: DbSignUpOptions, callback: Auth0Callback<DbSignUpResults>): void;
|
107 |
|
108 | /**
|
109 | * Initializes the change password flow
|
110 | *
|
111 | * @param options: https://auth0.com/docs/api/authentication#!#post--dbconnections-change_password
|
112 | */
|
113 | changePassword(options: ChangePasswordOptions, callback: Auth0Callback<any>): void;
|
114 | }
|
115 |
|
116 | export class Management {
|
117 | |
118 |
|
119 |
|
120 | constructor(options: ManagementOptions);
|
121 |
|
122 | /**
|
123 | * Returns the user profile. https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id
|
124 | */
|
125 | getUser(userId: string, callback: Auth0Callback<Auth0UserProfile>): void;
|
126 |
|
127 | /**
|
128 | * Updates the user metadata. It will patch the user metadata with the attributes sent.
|
129 | * https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id
|
130 | */
|
131 | patchUserMetadata(userId: string, userMetadata: any, callback: Auth0Callback<Auth0UserProfile>): void;
|
132 | /**
|
133 | * Updates the user attributes.
|
134 | * It will patch the root attributes that the server allows it.
|
135 | * {@link https:
|
136 | */
|
137 | patchUserAttributes(userId: string, user: Auth0UserProfile, callback: Auth0Callback<Auth0UserProfile>): void;
|
138 | |
139 |
|
140 |
|
141 | linkUser(userId: string, secondaryUserToken: string, callback: Auth0Callback<any>): void;
|
142 | }
|
143 |
|
144 | export class WebAuth {
|
145 | constructor(options: AuthOptions);
|
146 | client: Authentication;
|
147 | popup: Popup;
|
148 | redirect: Redirect;
|
149 | crossOriginAuthentication: CrossOriginAuthentication;
|
150 |
|
151 | /**
|
152 | * Redirects to the hosted login page (`/authorize`) in order to initialize a new authN/authZ transaction
|
153 | *
|
154 | * @param options: https://auth0.com/docs/api/authentication#!#get--authorize_db
|
155 | */
|
156 | authorize(options?: AuthorizeOptions): void;
|
157 |
|
158 | /**
|
159 | * Parse the url hash and extract the returned tokens depending on the transaction.
|
160 | *
|
161 | * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed
|
162 | * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be
|
163 | * accepted.
|
164 | *
|
165 | * @param callback: any(err, token_payload)
|
166 | */
|
167 | parseHash(callback: Auth0Callback<Auth0DecodedHash | null, Auth0ParseHashError>): void;
|
168 |
|
169 | /**
|
170 | * Parse the url hash and extract the returned tokens depending on the transaction.
|
171 | *
|
172 | * Only validates id_tokens signed by Auth0 using the RS256 algorithm using the public key exposed
|
173 | * by the `/.well-known/jwks.json` endpoint. Id tokens signed with other algorithms will not be
|
174 | * accepted.
|
175 | *
|
176 | * @param callback: any(err, token_payload)
|
177 | */
|
178 | parseHash(options: ParseHashOptions, callback: Auth0Callback<Auth0DecodedHash | null, Auth0ParseHashError>): void;
|
179 |
|
180 | /**
|
181 | * Decodes the id_token and verifies the nonce.
|
182 | *
|
183 | * @param callback: function(err, {payload, transaction})
|
184 | */
|
185 | validateToken(token: string, nonce: string, callback: Auth0Callback<any>): void;
|
186 |
|
187 | /**
|
188 | * Executes a silent authentication transaction under the hood in order to fetch a new tokens for the current session.
|
189 | * This method requires that all Auth is performed with {@link authorize}
|
190 | * Watch out! If you're not using the hosted login page to do social logins, you have to use your own [social connection keys](https://manage.auth0.com/#/connections/social).
|
191 | * If you use Auth0's dev keys, you'll always get `login_required` as an error when calling this method.
|
192 | *
|
193 | * @param options: any valid oauth2 parameter to be sent to the `/authorize` endpoint
|
194 | */
|
195 | renewAuth(options: RenewAuthOptions, callback: Auth0Callback<any>): void;
|
196 |
|
197 | |
198 |
|
199 |
|
200 |
|
201 |
|
202 | changePassword(options: ChangePasswordOptions, callback: Auth0Callback<any>): void;
|
203 |
|
204 | |
205 |
|
206 |
|
207 |
|
208 |
|
209 | signup(options: DbSignUpOptions, callback: Auth0Callback<any>): void;
|
210 |
|
211 | |
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 | signupAndAuthorize(options: DbSignUpOptions, callback: Auth0Callback<any>): void;
|
218 |
|
219 | |
220 |
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 |
|
227 |
|
228 |
|
229 |
|
230 | login(options: CrossOriginLoginOptions, callback: Auth0Callback<any>): void;
|
231 |
|
232 | |
233 |
|
234 |
|
235 |
|
236 |
|
237 | crossOriginAuthenticationCallback(): void;
|
238 |
|
239 | |
240 |
|
241 |
|
242 |
|
243 | crossOriginVerification(): void;
|
244 |
|
245 | |
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 | logout(options: LogoutOptions): void;
|
256 |
|
257 | |
258 |
|
259 |
|
260 |
|
261 |
|
262 | passwordlessStart(options: PasswordlessStartOptions, callback: Auth0Callback<any>): void;
|
263 |
|
264 | |
265 |
|
266 |
|
267 |
|
268 |
|
269 | passwordlessVerify(options: PasswordlessVerifyOptions, callback: Auth0Callback<any>): void;
|
270 |
|
271 | |
272 |
|
273 |
|
274 |
|
275 |
|
276 | passwordlessLogin(options: PasswordlessLoginOptions, callback: Auth0Callback<any>): void;
|
277 |
|
278 | |
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 | checkSession(options: CheckSessionOptions, cb: Auth0Callback<any>): void;
|
286 |
|
287 | |
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 | renderCaptcha(element: HTMLElement, options?: CatpchaConfiguration, callback?: Auth0Callback<any>): Captcha;
|
297 | }
|
298 |
|
299 | export class Redirect {
|
300 | constructor(client: any, options: any);
|
301 |
|
302 | /**
|
303 | * Performs authentication with username/email and password with a database connection
|
304 | *
|
305 | * This method is not compatible with API Auth so if you need to fetch API tokens with audience
|
306 | * you should use {@link authorize} or {@link login}.
|
307 | */
|
308 | loginWithCredentials(
|
309 | options: {
|
310 |
|
311 | redirectUri?: string | undefined;
|
312 |
|
313 | responseType?: string | undefined;
|
314 |
|
315 | responseMode?: "query" | "fragment" | undefined;
|
316 |
|
317 | scope: string;
|
318 | },
|
319 | callback: Auth0Callback<any>,
|
320 | ): void;
|
321 |
|
322 | |
323 |
|
324 |
|
325 | signupAndLogin(
|
326 | options: {
|
327 |
|
328 | email: string;
|
329 |
|
330 | password: string;
|
331 |
|
332 | connection: string;
|
333 |
|
334 | userMetadata?: unknown | undefined;
|
335 | } & CrossOriginLoginOptions,
|
336 | callback: Auth0Callback<any>,
|
337 | ): void;
|
338 | }
|
339 |
|
340 | export class Popup {
|
341 | constructor(client: any, options: any);
|
342 |
|
343 | /**
|
344 | * Returns a new instance of the popup handler
|
345 | */
|
346 | private buildPopupHandler(): any;
|
347 |
|
348 | /**
|
349 | * Initializes the popup window and returns the instance to be used later in order to avoid being blocked by the browser.
|
350 | *
|
351 | * @param options: receives the window height and width and any other window feature to be sent to window.open
|
352 | */
|
353 | preload(options: any): any;
|
354 |
|
355 | /**
|
356 | * Handles the popup logic for the callback page.
|
357 | * @see {@link parseHash}
|
358 | */
|
359 | callback(options: {
|
360 | |
361 |
|
362 |
|
363 |
|
364 | hash: string;
|
365 |
|
366 | state?: string | undefined;
|
367 |
|
368 | nonce?: string | undefined;
|
369 | |
370 |
|
371 |
|
372 |
|
373 | _idTokenVerification?: string | undefined;
|
374 | }): void;
|
375 |
|
376 | |
377 |
|
378 |
|
379 |
|
380 | authorize(
|
381 | options: {
|
382 |
|
383 | domain: string;
|
384 |
|
385 | clientId?: string | undefined;
|
386 | |
387 |
|
388 |
|
389 |
|
390 |
|
391 | connection?: string | undefined;
|
392 |
|
393 | redirectUri: string;
|
394 | |
395 |
|
396 |
|
397 |
|
398 |
|
399 | responseType: string;
|
400 | |
401 |
|
402 |
|
403 |
|
404 | responseMode?: "query" | "fragment" | "form_post" | undefined;
|
405 | |
406 |
|
407 |
|
408 |
|
409 | state?: string | undefined;
|
410 | |
411 |
|
412 |
|
413 |
|
414 | nonce?: string | undefined;
|
415 |
|
416 | scope?: string | undefined;
|
417 |
|
418 | audience?: string | undefined;
|
419 |
|
420 | owp?: boolean | undefined;
|
421 | },
|
422 | callback: Auth0Callback<Auth0Result>,
|
423 | ): void;
|
424 |
|
425 | |
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 | loginWithCredentials(
|
432 | options: {
|
433 |
|
434 | redirectUri?: string | undefined;
|
435 |
|
436 | responseType?: "code" | "token" | undefined;
|
437 |
|
438 | responseMode?: "query" | "fragment" | undefined;
|
439 |
|
440 | scope?: string | undefined;
|
441 | },
|
442 | callback: Auth0Callback<any>,
|
443 | ): void;
|
444 |
|
445 | |
446 |
|
447 |
|
448 | passwordlessVerify(
|
449 | options: {
|
450 | type: "sms" | "email";
|
451 |
|
452 | phoneNumber?: string | undefined;
|
453 |
|
454 | email?: string | undefined;
|
455 |
|
456 | connection: string;
|
457 |
|
458 | verificationCode: string;
|
459 | },
|
460 | callback: Auth0Callback<any>,
|
461 | ): void;
|
462 |
|
463 | |
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 | signupAndLogin(
|
470 | options: {
|
471 |
|
472 | email: string;
|
473 |
|
474 | password: string;
|
475 |
|
476 | connection: string;
|
477 |
|
478 | userMetadata?: unknown | undefined;
|
479 | },
|
480 | callback: Auth0Callback<any>,
|
481 | ): void;
|
482 | }
|
483 |
|
484 | export class CrossOriginAuthentication {
|
485 | constructor(webAuth: any, options: any);
|
486 |
|
487 | /**
|
488 | * Logs in the user with username and password using the cross origin authentication (/co/authenticate) flow.
|
489 | * You can use either `username` or `email` to identify the user, but `username` will take precedence over `email`.
|
490 | * This only works when 3rd party cookies are enabled in the browser.
|
491 | * After the /co/authenticate call, you'll have to use the {@link parseHash} function at the `redirectUri` specified in the constructor.
|
492 | *
|
493 | * @param options options used in the {@link authorize} call after the login_ticket is acquired
|
494 | * @param cb Callback function called only when an authentication error, like invalid username or password, occurs.
|
495 | * For other types of errors, there will be a redirect to the `redirectUri`.
|
496 | */
|
497 | login(options: CrossOriginLoginOptions, callback: Auth0Callback<any>): void;
|
498 |
|
499 | |
500 |
|
501 |
|
502 | callback(): void;
|
503 | }
|
504 |
|
505 | export type Auth0Callback<T, E = Auth0Error> = (error: null | E, result: T) => void;
|
506 |
|
507 | export interface TokenProvider {
|
508 | enableCache?: boolean | undefined;
|
509 | cacheTTLInSeconds?: number | undefined;
|
510 | }
|
511 |
|
512 | export interface ManagementOptions {
|
513 | domain: string;
|
514 | token?: string | undefined;
|
515 | clientId?: string | undefined;
|
516 | clientSecret?: string | undefined;
|
517 | audience?: string | undefined;
|
518 | scope?: string | undefined;
|
519 | tokenProvider?: TokenProvider | undefined;
|
520 | telemetry?: boolean | undefined;
|
521 | }
|
522 |
|
523 | export interface AuthOptions {
|
524 | domain: string;
|
525 | clientID: string;
|
526 | responseType?: string | undefined;
|
527 | responseMode?: string | undefined;
|
528 | redirectUri?: string | undefined;
|
529 | scope?: string | undefined;
|
530 | audience?: string | undefined;
|
531 | |
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 | cookieDomain?: string | undefined;
|
538 | |
539 |
|
540 |
|
541 |
|
542 | maxAge?: number | undefined;
|
543 | leeway?: number | undefined;
|
544 | jwksURI?: string | undefined;
|
545 | overrides?: {
|
546 | __tenant?: string | undefined;
|
547 | __token_issuer?: string | undefined;
|
548 | __jwks_uri?: string | undefined;
|
549 | } | undefined;
|
550 | plugins?: any;
|
551 | popupOrigin?: string | undefined;
|
552 | protocol?: string | undefined;
|
553 | response_type?: string | undefined;
|
554 | state?: string | undefined;
|
555 | tenant?: string | undefined;
|
556 | universalLoginPage?: boolean | undefined;
|
557 | _csrf?: string | undefined;
|
558 | _intstate?: string | undefined;
|
559 | _timesToRetryFailedRequests?: number | undefined;
|
560 | _disableDeprecationWarnings?: boolean | undefined;
|
561 | _sendTelemetry?: boolean | undefined;
|
562 | _telemetryInfo?: any;
|
563 | __tryLocalStorageFirst?: boolean | undefined;
|
564 | }
|
565 |
|
566 | export type DoneCallback = (err?: Auth0Error) => void;
|
567 |
|
568 | export interface Captcha {
|
569 | reload: (done: DoneCallback) => void;
|
570 | getValue: () => string;
|
571 | }
|
572 |
|
573 | export interface CatpchaConfiguration {
|
574 | |
575 |
|
576 |
|
577 | templates?: CaptchaTemplates | undefined;
|
578 |
|
579 | |
580 |
|
581 |
|
582 |
|
583 | lang?: string | undefined;
|
584 | }
|
585 |
|
586 |
|
587 |
|
588 |
|
589 | export interface CaptchaTemplates {
|
590 | |
591 |
|
592 |
|
593 | auth0?: ((challenge: Auth0Challenge) => string) | undefined;
|
594 |
|
595 | /**
|
596 | * Template function receiving the challenge and returning an string
|
597 | */
|
598 | recaptcha_v2?: ((challenge: Auth0Challenge) => string) | undefined;
|
599 |
|
600 | error: (error: Error) => string;
|
601 | }
|
602 |
|
603 | export interface Auth0Challenge {
|
604 | type: "code";
|
605 | image: string;
|
606 | required: boolean;
|
607 | provider: "auth0" | "recaptcha_v2";
|
608 | [other: string]: unknown;
|
609 | }
|
610 |
|
611 | export interface PasswordlessAuthOptions {
|
612 | connection: string;
|
613 | verificationCode: string;
|
614 | phoneNumber: string;
|
615 | email: string;
|
616 | }
|
617 |
|
618 |
|
619 |
|
620 |
|
621 | export type LibErrorCodes = "timeout" | "request_error" | "invalid_token";
|
622 |
|
623 |
|
624 |
|
625 |
|
626 | export type LoginRequiredErrorCode = "login_required";
|
627 |
|
628 |
|
629 |
|
630 |
|
631 |
|
632 |
|
633 | export type InteractionRequiredErrorCode = "interaction_required";
|
634 |
|
635 |
|
636 |
|
637 |
|
638 | export type ConsentRequiredErrorCode = "consent_required";
|
639 |
|
640 |
|
641 |
|
642 |
|
643 | export type SpecErrorCodes =
|
644 | | LoginRequiredErrorCode
|
645 | | InteractionRequiredErrorCode
|
646 | | ConsentRequiredErrorCode
|
647 | | "account_selection_required"
|
648 | | "invalid_request_uri"
|
649 | | "invalid_request_object"
|
650 | | "request_not_supported"
|
651 | | "request_uri_not_supported"
|
652 | | "registration_not_supported";
|
653 |
|
654 | export interface Auth0Error {
|
655 | error: LibErrorCodes | SpecErrorCodes | string;
|
656 | errorDescription?: string | undefined;
|
657 |
|
658 | error_description?: string | undefined;
|
659 |
|
660 | code?: string | undefined;
|
661 | description?: string | undefined;
|
662 | name?: string | undefined;
|
663 | policy?: string | undefined;
|
664 | original?: any;
|
665 | statusCode?: number | undefined;
|
666 | statusText?: string | undefined;
|
667 | }
|
668 |
|
669 |
|
670 |
|
671 |
|
672 |
|
673 | export interface Auth0Result {
|
674 | |
675 |
|
676 |
|
677 |
|
678 | accessToken?: string | undefined;
|
679 |
|
680 | expiresIn?: number | undefined;
|
681 |
|
682 | idToken?: string | undefined;
|
683 | |
684 |
|
685 |
|
686 |
|
687 |
|
688 | refreshToken?: string | undefined;
|
689 |
|
690 | appState?: any;
|
691 | }
|
692 |
|
693 | export type Auth0ParseHashError = Auth0Error & {
|
694 | state?: string | undefined;
|
695 | };
|
696 |
|
697 |
|
698 |
|
699 |
|
700 | export interface Auth0DecodedHash {
|
701 | accessToken?: string | undefined;
|
702 | idToken?: string | undefined;
|
703 | idTokenPayload?: any;
|
704 | appState?: any;
|
705 | refreshToken?: string | undefined;
|
706 | state?: string | undefined;
|
707 | expiresIn?: number | undefined;
|
708 | tokenType?: string | undefined;
|
709 | scope?: string | undefined;
|
710 | }
|
711 |
|
712 |
|
713 | export interface Auth0DelegationToken {
|
714 |
|
715 | expiresIn: number;
|
716 |
|
717 | idToken: string;
|
718 |
|
719 | tokenType: string;
|
720 | }
|
721 |
|
722 | export interface ChangePasswordOptions {
|
723 | connection: string;
|
724 | email: string;
|
725 | }
|
726 |
|
727 | export interface BaseAuthOptions {
|
728 | clientID?: string | undefined;
|
729 | responseType?: string | undefined;
|
730 | redirectUri?: string | undefined;
|
731 | scope?: string | undefined;
|
732 | audience?: string | undefined;
|
733 | state?: string | undefined;
|
734 | nonce?: string | undefined;
|
735 | _csrf?: string | undefined;
|
736 | __instate?: string | undefined;
|
737 | }
|
738 |
|
739 | export interface PasswordlessStartAuthParams extends BaseAuthOptions {
|
740 | responseMode?: string | undefined;
|
741 | }
|
742 |
|
743 | export interface PasswordlessStartOptions {
|
744 | connection: string;
|
745 | send: "link" | "code";
|
746 | phoneNumber?: string | undefined;
|
747 | email?: string | undefined;
|
748 | authParams?: PasswordlessStartAuthParams | undefined;
|
749 | }
|
750 |
|
751 | export interface PasswordlessVerifyOptions extends BaseAuthOptions {
|
752 | connection: string;
|
753 | verificationCode: string;
|
754 | phoneNumber?: string | undefined;
|
755 | email?: string | undefined;
|
756 | send?: "link" | "code" | undefined;
|
757 | responseMode?: string | undefined;
|
758 | }
|
759 |
|
760 | export interface PasswordlessLoginOptions extends BaseAuthOptions {
|
761 | connection: string;
|
762 | verificationCode: string;
|
763 | phoneNumber?: string | undefined;
|
764 | email?: string | undefined;
|
765 | }
|
766 |
|
767 | export interface Auth0UserProfile {
|
768 | name: string;
|
769 | nickname: string;
|
770 | picture: string;
|
771 | user_id: string;
|
772 | username?: string | undefined;
|
773 | given_name?: string | undefined;
|
774 | family_name?: string | undefined;
|
775 | email?: string | undefined;
|
776 | email_verified?: boolean | undefined;
|
777 | clientID: string;
|
778 | gender?: string | undefined;
|
779 | locale?: string | undefined;
|
780 | identities: Auth0Identity[];
|
781 | created_at: string;
|
782 | updated_at: string;
|
783 | sub: string;
|
784 | user_metadata?: any;
|
785 | app_metadata?: any;
|
786 | }
|
787 |
|
788 | export interface MicrosoftUserProfile extends Auth0UserProfile {
|
789 | emails?: string[] | undefined;
|
790 | }
|
791 |
|
792 | export interface Office365UserProfile extends Auth0UserProfile {
|
793 | tenantid: string;
|
794 | upn: string;
|
795 | }
|
796 |
|
797 | export interface AdfsUserProfile extends Auth0UserProfile {
|
798 | issuer?: string | undefined;
|
799 | }
|
800 |
|
801 | export interface AuthorizeUrlOptions {
|
802 | |
803 |
|
804 |
|
805 | clientID?: string | undefined;
|
806 | |
807 |
|
808 |
|
809 | redirectUri: string;
|
810 | |
811 |
|
812 |
|
813 |
|
814 |
|
815 | responseType: string;
|
816 | |
817 |
|
818 |
|
819 |
|
820 |
|
821 | responseMode?: "query" | "fragment" | "form_post" | undefined;
|
822 | |
823 |
|
824 |
|
825 |
|
826 | state?: string | undefined;
|
827 | |
828 |
|
829 |
|
830 |
|
831 | nonce?: string | undefined;
|
832 | |
833 |
|
834 |
|
835 | scope?: string | undefined;
|
836 | |
837 |
|
838 |
|
839 | audience?: string | undefined;
|
840 | }
|
841 |
|
842 | export interface Auth0Identity {
|
843 | connection: string;
|
844 | isSocial: boolean;
|
845 | provider: string;
|
846 | user_id: string;
|
847 | }
|
848 |
|
849 | export interface LoginOptions {
|
850 | username: string;
|
851 | password: string;
|
852 | scope?: string | undefined;
|
853 | }
|
854 |
|
855 | export interface DefaultLoginOptions extends LoginOptions {
|
856 | audience?: string | undefined;
|
857 | realm: string;
|
858 | }
|
859 |
|
860 | export interface DefaultDirectoryLoginOptions extends LoginOptions {
|
861 | audience?: string | undefined;
|
862 | }
|
863 |
|
864 | export interface ResourceOwnerLoginOptions extends LoginOptions {
|
865 | connection: string;
|
866 | device?: string | undefined;
|
867 | }
|
868 |
|
869 | export interface CrossOriginLoginOptions {
|
870 | username?: string | undefined;
|
871 | email?: string | undefined;
|
872 | password: string;
|
873 | realm?: string | undefined;
|
874 | domain?: string | undefined;
|
875 | clientID?: string | undefined;
|
876 | redirectUri?: string | undefined;
|
877 | responseType?: string | undefined;
|
878 | responseMode?: string | undefined;
|
879 | state?: string | undefined;
|
880 | nonce?: string | undefined;
|
881 | scope?: string | undefined;
|
882 | audience?: string | undefined;
|
883 | captcha?: Captcha | undefined;
|
884 |
|
885 | onRedirecting?: (done: () => void) => void | undefined;
|
886 | }
|
887 |
|
888 | export interface LogoutOptions {
|
889 | clientID?: string | undefined;
|
890 | returnTo?: string | undefined;
|
891 | federated?: boolean | undefined;
|
892 | }
|
893 |
|
894 | export interface DelegationOptions {
|
895 | client_id?: string | undefined;
|
896 | grant_type: string;
|
897 | id_token?: string | undefined;
|
898 | refresh_token?: string | undefined;
|
899 | target?: string | undefined;
|
900 | scope?: string | undefined;
|
901 | api_type?: string | undefined;
|
902 | }
|
903 |
|
904 | export interface DbSignUpOptions {
|
905 |
|
906 | email: string;
|
907 |
|
908 | password: string;
|
909 |
|
910 | connection: string;
|
911 |
|
912 | username?: string | undefined;
|
913 | scope?: string | undefined;
|
914 |
|
915 | userMetadata?: unknown | undefined;
|
916 | }
|
917 |
|
918 |
|
919 | export interface DbSignUpResults {
|
920 |
|
921 | email: string;
|
922 |
|
923 | emailVerified: boolean;
|
924 | }
|
925 |
|
926 | export interface ParseHashOptions {
|
927 | hash?: string | undefined;
|
928 | state?: string | undefined;
|
929 | nonce?: string | undefined;
|
930 | _idTokenVerification?: boolean | undefined;
|
931 |
|
932 | __enableIdPInitiatedLogin?: boolean | undefined;
|
933 | }
|
934 |
|
935 | export interface RenewAuthOptions {
|
936 | |
937 |
|
938 |
|
939 | domain?: string | undefined;
|
940 | |
941 |
|
942 |
|
943 | clientID?: string | undefined;
|
944 | |
945 |
|
946 |
|
947 | redirectUri?: string | undefined;
|
948 | |
949 |
|
950 |
|
951 |
|
952 |
|
953 | responseType?: string | undefined;
|
954 | |
955 |
|
956 |
|
957 |
|
958 |
|
959 |
|
960 | responseMode?: string | undefined;
|
961 | |
962 |
|
963 |
|
964 |
|
965 | state?: string | undefined;
|
966 | |
967 |
|
968 |
|
969 |
|
970 | nonce?: string | undefined;
|
971 | |
972 |
|
973 |
|
974 | scope?: string | undefined;
|
975 | |
976 |
|
977 |
|
978 | audience?: string | undefined;
|
979 | |
980 |
|
981 |
|
982 |
|
983 |
|
984 | postMessageDataType?: string | undefined;
|
985 | |
986 |
|
987 |
|
988 |
|
989 | postMessageOrigin?: string | undefined;
|
990 | |
991 |
|
992 |
|
993 |
|
994 | timeout?: number | undefined;
|
995 | |
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 | usePostMessage?: boolean | undefined;
|
1002 | }
|
1003 |
|
1004 | export interface AuthorizeOptions {
|
1005 | domain?: string | undefined;
|
1006 | clientID?: string | undefined;
|
1007 | connection?: string | undefined;
|
1008 | redirectUri?: string | undefined;
|
1009 | responseType?: string | undefined;
|
1010 | responseMode?: string | undefined;
|
1011 | state?: string | undefined;
|
1012 | nonce?: string | undefined;
|
1013 | scope?: string | undefined;
|
1014 | audience?: string | undefined;
|
1015 | language?: string | undefined;
|
1016 | login_hint?: string | undefined;
|
1017 | prompt?: string | undefined;
|
1018 | mode?: "login" | "signUp" | undefined;
|
1019 | screen_hint?: "signup" | undefined;
|
1020 | accessType?: string | undefined;
|
1021 | approvalPrompt?: string | undefined;
|
1022 | appState?: any;
|
1023 | connection_scope?: string | string[] | undefined;
|
1024 | organization?: string | undefined;
|
1025 | invitation?: string | undefined;
|
1026 | }
|
1027 |
|
1028 | export type SsoDataResult = SsoSessionFoundResult | SsoSessionNotFoundResult;
|
1029 |
|
1030 | export interface SsoSessionFoundResult {
|
1031 | lastUsedClientID: string;
|
1032 | lastUsedConnection: {
|
1033 | name: string;
|
1034 | strategy?: string | undefined;
|
1035 | };
|
1036 | lastUsedUserID: string;
|
1037 | lastUsedUsername: string;
|
1038 | sessionClients: string[];
|
1039 | sso: true;
|
1040 | }
|
1041 |
|
1042 | export interface SsoSessionNotFoundResult {
|
1043 | sso: false;
|
1044 | }
|
1045 |
|
1046 | export interface CheckSessionOptions extends AuthorizeOptions {
|
1047 | |
1048 |
|
1049 |
|
1050 | usePostMessage?: boolean | undefined;
|
1051 | }
|
1052 |
|
1053 | export const version: {
|
1054 | raw: string;
|
1055 | };
|