naystack - v1.9.9
    Preparing search index...

    Interface SetupSocialAuthOptions

    Options for setupSocialAuth.

    interface SetupSocialAuthOptions {
        endpoint: string;
        errorRedirectURL: string;
        onConnect: (connection: SocialConnection) => Promise<string | void>;
        providers: SocialProvider[];
        redirectURL: string;
        scopes?: Partial<Record<SocialPlatform, string[]>>;
    }
    Index

    Properties

    endpoint: string

    Base URL this route is mounted at, e.g. "https://yourapp.com/api/social". Each provider's redirect URI is <endpoint>/<platform lowercased> and must be registered with that platform verbatim.

    errorRedirectURL: string
    onConnect: (connection: SocialConnection) => Promise<string | void>

    Return a string to show as an error (redirects to errorRedirectURL); return void on success.

    providers: SocialProvider[]
    redirectURL: string

    Where a successful connect lands, unless the start request carried returnTo.

    scopes?: Partial<Record<SocialPlatform, string[]>>

    Per-platform permissions; each provider has its own default.