Skip to content

Commit 8554836

Browse files
committed
wip
1 parent d1992ad commit 8554836

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/auth/src/core/auth/auth_impl.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
7878
private redirectPersistenceManager?: PersistenceUserManager;
7979
private authStateSubscription = new Subscription<User>(this);
8080
private idTokenSubscription = new Subscription<User>(this);
81+
private beforeStateSubscription = new Subscription<User>(this);
8182
private redirectUser: UserInternal | null = null;
8283
private isProactiveRefreshEnabled = false;
8384

@@ -371,6 +372,17 @@ export class AuthImpl implements AuthInternal, _FirebaseService {
371372
);
372373
}
373374

375+
beforeAuthStateChanged(
376+
next: NextFn<User | null>,
377+
): Unsubscribe {
378+
return this.registerStateListener(
379+
this.beforeStateSubscription,
380+
next,
381+
error,
382+
completed
383+
);
384+
}
385+
374386
onIdTokenChanged(
375387
nextOrObserver: NextOrObserver<User>,
376388
error?: ErrorFn,

0 commit comments

Comments
 (0)