Commit 6c16c60
committed
feat(FR-2626): migrate LoginView sToken path to STokenLoginBoundary
Story 2 of Epic FR-2616. Wires up the reusable STokenLoginBoundary
component introduced in Story 1 as the canonical sToken entry point
for the main app (/ and /interactive-login).
Changes:
- Add STokenGuard component in routes.tsx: reads sToken via useSToken
(nuqs), conditionally wraps the downstream tree with
STokenLoginBoundary when a token is present, passthrough otherwise.
Applied to / and /interactive-login routes.
- Add persistPostLoginState helper in helper/loginSessionAuth.ts
consolidating the non-LoginView-specific post-login side effects
(last_login / login_attempt counters, clear saved credentials,
persist api_endpoint, set client.ready) so the route-level onSuccess
callback and LoginView's panel-based postConnectSetup can keep
these behaviors in lockstep. client.ready = true is what allows
useLoginOrchestration to short-circuit on subsequent LoginView
mounts.
- Remove the sToken branch from LoginView.connectUsingSession
(previously at lines 455-490). The component no longer reads
window.location.search for sToken; URL parsing is the route
wrapper's responsibility via nuqs (spec 'URL 파라미터 파싱 규약').
Drops the now-unused tokenLogin import.
Behavior parity:
- Already-logged-in users arriving with ?sToken=... skip token_login
via the boundary's check_login idempotency fast-path (FR-2631).
- Successful sToken auth persists the same localStorage /
backendaioptions / cookie state the legacy branch did.
- URL cleanup still strips both sToken and the deprecated stoken
key, now via nuqs setter rather than history.replaceState({}).
Resolves FR-2636, FR-2637, FR-2638 (bundled — same two files,
tightly-coupled change). FR-2639 (E2E regression) ships in the
follow-up PR.
Refs FR-2616, FR-26261 parent 3edbd01 commit 6c16c60
3 files changed
Lines changed: 114 additions & 69 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
452 | 451 | | |
453 | 452 | | |
454 | 453 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
491 | 458 | | |
492 | 459 | | |
493 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
209 | 248 | | |
210 | 249 | | |
211 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
692 | 695 | | |
693 | 696 | | |
694 | 697 | | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
695 | 730 | | |
696 | 731 | | |
697 | 732 | | |
| |||
702 | 737 | | |
703 | 738 | | |
704 | 739 | | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
712 | 749 | | |
713 | 750 | | |
714 | 751 | | |
| |||
771 | 808 | | |
772 | 809 | | |
773 | 810 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
797 | 817 | | |
798 | | - | |
| 818 | + | |
799 | 819 | | |
800 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
801 | 840 | | |
802 | 841 | | |
803 | 842 | | |
| |||
0 commit comments