Commit de58f88
fix(FR-2574): fix sToken SSO login on root URL
Three bugs prevented sToken-based SSO login from working on /?sToken=...:
1. Race condition: useLoginOrchestration fired before apiEndpoint state
was populated, causing connectUsingSession to bail on empty endpoint.
Fix: gate orchestration on both isConfigLoaded AND apiEndpoint.
2. Full page reload: window.location.href='/' after tokenLogin stripped
the sToken and caused a second load without credentials.
Fix: replace with in-React post-connection setup + history.replaceState.
3. Missing session persistence: token_login() didn't save _loginSessionId
to localStorage, so check_login() failed after page refresh.
Fix: add localStorage.setItem in token_login() success path.
Resolves #6692(FR-2574)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent ab84bd0 commit de58f88
3 files changed
Lines changed: 82 additions & 20 deletions
File tree
- react/src
- components
- hooks
- src/lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
346 | 345 | | |
347 | | - | |
348 | 346 | | |
349 | 347 | | |
350 | 348 | | |
351 | 349 | | |
352 | 350 | | |
353 | 351 | | |
354 | 352 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | 353 | | |
359 | 354 | | |
360 | 355 | | |
| |||
374 | 369 | | |
375 | 370 | | |
376 | 371 | | |
377 | | - | |
378 | | - | |
379 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
380 | 375 | | |
381 | 376 | | |
382 | 377 | | |
383 | 378 | | |
384 | 379 | | |
385 | 380 | | |
386 | | - | |
387 | 381 | | |
388 | 382 | | |
389 | 383 | | |
| |||
392 | 386 | | |
393 | 387 | | |
394 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
| |||
455 | 465 | | |
456 | 466 | | |
457 | 467 | | |
458 | | - | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
459 | 478 | | |
460 | | - | |
| 479 | + | |
| 480 | + | |
461 | 481 | | |
462 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
463 | 488 | | |
464 | 489 | | |
465 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
207 | 231 | | |
| 232 | + | |
208 | 233 | | |
209 | 234 | | |
210 | 235 | | |
211 | | - | |
| 236 | + | |
212 | 237 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1081 | 1089 | | |
1082 | 1090 | | |
1083 | | - | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
1084 | 1096 | | |
1085 | 1097 | | |
1086 | 1098 | | |
| |||
0 commit comments