Repository navigation
Commit 69d94e6
committed
fix(auth): stop beforeAuthStateChanged from holding the app unstable (#3770)
AngularFire wrapped beforeAuthStateChanged so that registering the
hook added a pending task, cleared only when the callback first runs.
Firebase runs that callback only on a sign-in or sign-out, so for a
visitor who does neither the app never became stable. Registered on
the server, it failed ng build during route extraction and left
server-rendered requests without a response.
This restores the blockUntilFirst: false override from #3590, which
#3613 dropped without comment while adding log-level overrides next
to it. The callback still runs inside Angular's zone and injection
context, and its returned promise still reaches Firebase, so a
rejection still cancels the sign-in. A call outside an injection
context now logs its per-call warning only at the verbose level, as
onMessage does.
Fixes #3748
docs(auth): scope the beforeAuthStateChanged note to rc.1 and earlier
Merging this change closes #3748, so the section's present-tense note
would point at a closed issue. Also removed the false claim that the
@angular/fire/auth import makes ng build hang: the guide registers the
hook only in the browser, so its own build succeeds.
The docs/auth.md change is left out, since it edits a section of the
guide that 20.1.x does not have.
(cherry picked from commit f182972)1 parent 0fa01ea commit 69d94e6
2 files changed
Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
0 commit comments