UNPKG

889 BTypeScriptView Raw
1declare type AuthSessionOptions = {
2 authUrl: string;
3 returnUrl?: string;
4};
5declare type AuthSessionResult = {
6 type: 'cancel' | 'dismiss' | 'locked';
7} | {
8 type: 'error' | 'success';
9 errorCode: string | null;
10 params: {
11 [key: string]: string;
12 };
13 url: string;
14};
15declare function startAsync(options: AuthSessionOptions): Promise<AuthSessionResult>;
16declare function dismiss(): void;
17declare function getStartUrl(authUrl: string, returnUrl: string): string;
18declare function getRedirectUrl(): string;
19declare function getDefaultReturnUrl(): string;
20declare const _default: {
21 dismiss: typeof dismiss;
22 getRedirectUrl: typeof getRedirectUrl;
23 getStartUrl: typeof getStartUrl;
24 getDefaultReturnUrl: typeof getDefaultReturnUrl;
25 readonly getRedirectUri: typeof getRedirectUrl;
26 startAsync: typeof startAsync;
27};
28export default _default;