import * as auth0 from 'auth0-js'; import { IAuthState, IAuthClient, IStorageOptions } from '@8base/utils'; export interface IAuth0Data { state?: object; isEmailVerified: boolean; idToken: string; email: string; idTokenPayload: any; firstName?: string; lastName?: string; avatar?: string; } export interface IAuth0IdTokenData { given_name: string; family_name: string; nickname: string; name: string; picture: string; updated_at: string; email: string; email_verified: boolean; iss: string; } export interface IAuth0ClientOptions { domain: string; clientId: string; redirectUri: string; scope?: string; audience?: string; responseType?: string; responseMode?: string; } export interface IWebAuth0AuthClientOptions extends IAuth0ClientOptions { logoutRedirectUri?: string; } /** * Creates instacne of the web auth0 auth client. */ declare class WebAuth0AuthClient implements IAuthClient { auth0: auth0.WebAuth; private logoutHasCalled; private readonly logoutRedirectUri?; private storageAPI; constructor(options: IWebAuth0AuthClientOptions, storageOptions?: IStorageOptions); setState(state: IAuthState): void; getState(): IAuthState; getTokenInfo(): IAuth0IdTokenData | undefined; purgeState(): void; checkIsEmailVerified(): boolean | undefined; checkIsAuthorized(): boolean; authorize(options?: object): void; checkSession(options?: object): Promise; changePassword(): Promise<{ email: string; }>; getAuthorizedData(): Promise; logout(options?: object): void; } export { WebAuth0AuthClient }; //# sourceMappingURL=WebAuth0AuthClient.d.ts.map