UNPKG

@5calls/react-components

Version:

React component library for 5 Calls webapp

34 lines (33 loc) 908 B
export interface UserState { idToken?: string; profile?: UserProfile; } export interface UserProfile { name: string; sub: string; exp: number; picture: string; 'https://5calls.org/email'?: string; 'https://5calls.org/phone'?: string; } export interface AuthProvider { login: () => void; isLoggedIn: () => boolean; logout: () => void; handleAuthentication: () => AuthResponse | Promise<AuthResponse>; checkAndRenewSession: (profile?: UserProfile) => void; } export interface AuthResponse { authToken: string; userProfile: UserProfile | undefined; } export interface Auth0Config { readonly poweredURL: string; readonly domain: string; readonly clientId: string; readonly callbackUri: string; readonly audience: string; readonly popupAuth: boolean; readonly campaignPhotoURL?: string; readonly campaignName?: string; }