export declare class OAuth2 { static authorizeImplicit({ authorizationUrl, clientId, scopes, extraParams, routingBasePath, redirectUri, successCallback, errorCallback, }: { authorizationUrl: string; clientId: string; scopes?: string[]; redirectUri?: string | null; routingBasePath?: string; extraParams?: Record; successCallback: OAuth2SuccessCallback; errorCallback: OAuth2ErrorCallback; }): void; static authorizeAuthorizationCode({ authorizationUrl, tokenUrl, clientId, clientSecret, codeVerifier, codeChallenge, scopes, extraParams, extraHeaders, routingBasePath, redirectUri, successCallback, errorCallback, }: { authorizationUrl: string; tokenUrl: string; clientId: string; clientSecret: string; codeVerifier?: string; codeChallenge?: string; scopes?: string[]; redirectUri?: string | null; routingBasePath?: string; extraParams?: Record; extraHeaders?: Record; successCallback: OAuth2SuccessCallback; errorCallback: OAuth2ErrorCallback; }): void; static clearRedirectData(flow: 'implicit' | 'authorizationCode'): void; static authorizeClientCredentials({ tokenUrl, clientId, clientSecret, scopes, extraParams, extraHeaders, successCallback, errorCallback, }: { tokenUrl: string; clientId: string; clientSecret: string; scopes?: string[]; extraParams?: Record; extraHeaders?: Record; successCallback: OAuth2SuccessCallback; errorCallback: OAuth2ErrorCallback; }): Promise; } export declare const oauth2Instance: OAuth2; export interface OAuthState { randomStr: string; } export declare function deriveCodeChallenge(codeVerifier: string): Promise;