From 980c447899eb6e3bc28c24fb2b4a58fdbe262306 Mon Sep 17 00:00:00 2001 From: Nicholas Jamieson Date: Tue, 18 Apr 2017 08:19:18 +1000 Subject: [PATCH] fix(auth): Use the injected app --- src/auth/auth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/auth/auth.ts b/src/auth/auth.ts index 76c5c0b7e..b81099a2a 100644 --- a/src/auth/auth.ts +++ b/src/auth/auth.ts @@ -15,7 +15,7 @@ export class AngularFireAuth { * Firebase Auth instance */ auth: firebase.auth.Auth; - + /** * Observable of authentication state */ @@ -35,7 +35,7 @@ export class AngularFireAuth { */ export function FirebaseAuthStateObservable(app: FirebaseApp): Observable { const authState = Observable.create((observer: Observer) => { - firebase.auth().onAuthStateChanged( + app.auth().onAuthStateChanged( (user?: firebase.User) => observer.next(user), (error: firebase.auth.Error) => observer.error(error), () => observer.complete()