import * as firebase from 'firebase'; /** * Basic interface to providers that will interact Firebase Authentication. */ export interface BasicAuth { /** * Returns Auth object from Firebase */ getAuth(): firebase.auth.Auth; /** * Checks if an user is authenticated to Firebase Authentication. */ isAuthenticated(): boolean; /** * Get user's UID */ getUserId(): string; /** * Gets user's name */ getUserName(): string | null; /** * Gets user's email */ getUserEmail(): string | null; /** * Authenticates user with email and password * @param email user's email * @param password user's password */ signInWithEmailAndPassword(email: string, password: string): Promise; /** * Creates user with email and password * @param email user's email * @param password user's password */ signUpWithEmailAndPassword(email: string, password: string): Promise; /** * Updates user profile * @param profile user's profile */ updateUserProfile(profile: any): Promise; /** * Resets user's password * @param email user's email */ resetPassword(email: string): Promise; /** * Signs user out */ signOut(): Promise; }