/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { OAuth2Client } from 'google-auth-library'; import type { Config } from '../config/config.js'; /** * An Authentication URL for updating the credentials of a Oauth2Client * as well as a promise that will resolve when the credentials have * been refreshed (or which throws error when refreshing credentials failed). */ export interface OauthWebLogin { authUrl: string; loginCompletePromise: Promise; } export declare function performLogin(config: Config): Promise; export declare function getOauthClient(config: Config): Promise; export declare function getAvailablePort(): Promise; export declare function authWithCode(client: OAuth2Client, code: string, codeVerifier: { codeVerifier: string; } | undefined, redirectUri: string): Promise; export declare function clearCachedCredentialFile(): Promise; /** * Clears the OAuth client cache to prevent session leakage during logout. * This is critical for security - without clearing the cache, users cannot properly logout. * * Clears the OAuth client cache. */ export declare function clearOauthClientCache(): void; export declare function resetOauthClientForTesting(): void;