Commit b496e7f
committed
fix(auth): initialize demo user data on transition
Fixes a critical bug in the demo environment where authenticating as a new user (anonymous or via email) would fail.
Previously, when a new user was created, the `AppInitializer` would immediately try to fetch their settings and preferences. In the demo environment, this data did not exist yet, causing a `NotFoundException` that would halt the login process and leave the UI unresponsive.
This fix modifies `AppInitializer.handleUserTransition` to explicitly call `DemoDataInitializerService` for new users in the demo environment. This ensures that the necessary user data is created on-the-fly *before* any attempt is made to read it, resolving the race condition and allowing the authentication flow to complete successfully.1 parent ef93f0d commit b496e7f
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
309 | 326 | | |
310 | 327 | | |
311 | 328 | | |
| |||
0 commit comments