import 'rxjs/add/operator/map'; import * as firebase from 'firebase'; import { FirestoreProvider } from '../firestore/firestore.provider'; import { SessionStorageProvider } from '../../session-storage/session-storage.provider'; import { Subject } from 'rxjs/Subject'; /** * Provider to handle the Firebase Authentication actions */ export declare class AuthProvider { firestoreProvider: FirestoreProvider; sessionStorageProvider: SessionStorageProvider; private currentUser; authSubject: Subject; constructor(firestoreProvider: FirestoreProvider, sessionStorageProvider: SessionStorageProvider); /** * Returns Auth object from Firebase */ storageUserToken(): void; /** * Get firebase's current auth object */ getAuth(): firebase.auth.Auth; /** * Checks if an user is authenticated on session. */ isAuthenticated(): boolean; /** * Get current user's UID */ getUserId(): string; /** * Gets current user's name */ getUserName(): string; /** * Gets current user's email */ getUserEmail(): string; /** * Authenticates user with email and password * @param email * @param password */ signInWithEmailAndPassword(email: string, password: string): Promise; /** * Creates user with email and password * @param email * @param password */ signUpWithEmailAndPassword(email: string, password: string): Promise; /** * Change current user's email * @param email */ changeEmail(email: string): Promise; /** * Changes current user's password * @param password */ changePassword(password: string): Promise; /** * Reauthenticates current user * @param credential */ reAuthenticateUser(credential: firebase.auth.AuthCredential): Promise; /** * Creates current user's credential * @param email * @param password */ createEmailCredential(email: string, password: string): firebase.auth.AuthCredential; /** * Updates current user profile * @param profile user's profile */ updateUserProfile(profile: any): Promise; /** * Resets current user's password * @param email user's email */ resetPassword(email: string): Promise; /** * Signs current user out */ signOut(): Promise; }