@octokit/types
    Preparing search index...

    Interface AuthInterface<AuthOptions, Authentication>

    Interface to implement complex authentication strategies for Octokit. An object Implementing the AuthInterface can directly be passed as the auth option in the Octokit constructor.

    For the official implementations of the most common authentication strategies, see https://github.com/octokit/auth.js

    interface AuthInterface<AuthOptions extends any[], Authentication extends any> {
        hook: {
            <T = any>(
                request: RequestInterface,
                options: EndpointOptions,
            ): Promise<OctokitResponse<T, number>>;
            <T = any>(
                request: RequestInterface,
                route: string,
                parameters?: RequestParameters,
            ): Promise<OctokitResponse<T, number>>;
        };
        (...args: AuthOptions): Promise<Authentication>;
    }

    Type Parameters

    • AuthOptions extends any[]
    • Authentication extends any
    Index

    Properties

    Properties

    hook: {
        <T = any>(
            request: RequestInterface,
            options: EndpointOptions,
        ): Promise<OctokitResponse<T, number>>;
        <T = any>(
            request: RequestInterface,
            route: string,
            parameters?: RequestParameters,
        ): Promise<OctokitResponse<T, number>>;
    }

    Type declaration