export interface OAuth2Config {
    clientId: string;
    authorizationEndpoint: string;
    tokenEndpoint: string;
    redirectUri: string;
    scope?: string;
}
export interface OAuth2TokenResponse {
    access_token: string;
    id_token?: string;
    refresh_token?: string;
    expires_in?: number;
    token_type: string;
}
export declare function isTokenExpired(tokenExpiry?: number): boolean;
export declare function startOAuth2Flow(config: OAuth2Config): Promise<OAuth2TokenResponse>;
export declare function refreshOAuth2Token(config: Omit<OAuth2Config, "authorizationEndpoint" | "redirectUri">, refreshToken: string): Promise<OAuth2TokenResponse>;
export declare function calculateTokenExpiry(expiresIn?: number): number | undefined;
