function createOAuthAppAuth(options) {
    const state = Object.assign({
        request: request$5.defaults({
            headers: {
                "user-agent": `octokit-auth-oauth-app.js/${VERSION$4} ${getUserAgent()}`,
            },
        }),
        clientType: "oauth-app",
    }, options);
    // @ts-expect-error not worth the extra code to appease TS
    return Object.assign(auth$3.bind(null, state), {
        hook: hook$1.bind(null, state),
    });
}
". "${endpoint.method} ${endpoint.url}" is not supported.`);
    }
    const credentials = btoaNode(`${state.clientId}:${state.clientSecret}`);
    endpoint.headers.authorization = `basic ${credentials}`;
    try {
        return await request(endpoint);
    }
    catch (error) {
        /* istanbul ignore if