Interface WebAuthorizeOptions

Options for controlling the SDK's behaviour when calling the /authorize endpoint.

interface WebAuthorizeOptions {
    customScheme?: string;
    ephemeralSession?: boolean;
    leeway?: number;
    useLegacyCallbackUrl?: boolean;
    useSFSafariViewController?: boolean | {
        presentationStyle?: SafariViewControllerPresentationStyle;
    };
}

Properties

customScheme?: string

Android only: Custom scheme to build the callback URL with.

ephemeralSession?: boolean

iOS only: Disable Single-Sign-On (SSO). It only affects iOS with versions 13 and above.

Default

false

leeway?: number

The amount of leeway, in seconds, to accommodate potential clock skew when validating an ID token's claims.

Default

60 seconds.

useLegacyCallbackUrl?: boolean
useSFSafariViewController?: boolean | {
    presentationStyle?: SafariViewControllerPresentationStyle;
}

iOS only: Uses SFSafariViewController instead of ASWebAuthenticationSession. If empty object is set, the presentationStyle defaults to SafariViewControllerPresentationStyle.fullScreen

This can be used as a boolean value or as an object which sets the presentationStyle. See the examples below for reference

Type declaration

Example

await authorize({}, {useSFSafariViewController: true});

or

Example

await authorize({}, {useSFSafariViewController: {presentationStyle: SafariViewControllerPresentationStyle.fullScreen}});

Generated using TypeDoc