import request from 'request'; import { Store } from './store'; export interface ChallengePair { verifier: string; challenge: string; } export interface AccessTokenResponse { response: request.Response; body: any; } export interface PKCEData { authorizeURL: string; challengePair: ChallengePair; } /** * Generate a new challenge pair and auth0 /authorize request URL */ export declare function generatePKCEData(authPort: number): PKCEData; /** * After successfuly authenticating and redirecting back to the app, we * extract the `code` from the redirect URI and use that together with * the code verifier to request an access code */ export declare function requestAccessToken(authCode: string, pkceData: PKCEData, authPort: number): Promise; export declare function setStore(s: Store): void; export declare function setSession(authResult: any): void; export declare function clearSession(): void; export declare function isAuthenticated(): boolean; export declare function getAccessTokenFromStore(): string | null; export declare function getIdTokenFromStore(): string | null; export declare function getAuthenticationUrl(): Promise;