Skip to content

Commit c823de0

Browse files
committed
chore(auth): add console warning to notify of breaking getAuth change
Fixes angular#248
1 parent 664a156 commit c823de0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/providers/auth.ts

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ export class AngularFireAuth extends ReplaySubject<FirebaseAuthState> {
127127
}
128128

129129
public getAuth(): FirebaseAuthState {
130+
console.warn(`WARNING: the getAuth() API has changed behavior since adding support for Firebase 3.
131+
This will return null for the initial value when the page loads, even if the user is actually logged in.
132+
Please observe the actual authState asynchronously by subscribing to the auth service: af.auth.subscribe().
133+
The getAuth method will be removed in future releases`);
130134
return this._authBackend.getAuth()
131135
}
132136

0 commit comments

Comments
 (0)