Commit 29b07bc
committed
chore: improve MFA session handling and add public session APIs
- Add public getAccessToken() and refreshSession() methods to Auth class
- refreshSession() validates session and clears SDK state on failure
- Replace all rehydrateSession() calls with refreshSession() for consistent
error handling; remove dead rehydrateSession() method
- Update enableMFA, manageMFA, and all factor management methods to use
refreshSession() and pass accessToken in request payloads
- Extract clearState() helper from logout() to avoid duplication
- Remove authSessionManager getter that exposed internal session manager
- Restore MFA_LEVELS.DEFAULT to avoid breaking change
- Vue example: track MFA status via reactive ref and reset on logout
Made-with: Cursor1 parent 67b5210 commit 29b07bc
11 files changed
Lines changed: 1137 additions & 401 deletions
File tree
- examples/vue-example
- src
- src
- core
- jrpc/v2
- utils
- test/v2
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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
| |||
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
| 662 | + | |
661 | 663 | | |
662 | 664 | | |
663 | 665 | | |
| |||
747 | 749 | | |
748 | 750 | | |
749 | 751 | | |
| 752 | + | |
750 | 753 | | |
751 | 754 | | |
752 | 755 | | |
| |||
756 | 759 | | |
757 | 760 | | |
758 | 761 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | 762 | | |
765 | 763 | | |
766 | 764 | | |
| |||
773 | 771 | | |
774 | 772 | | |
775 | 773 | | |
776 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
817 | 819 | | |
818 | 820 | | |
819 | 821 | | |
| 822 | + | |
820 | 823 | | |
821 | 824 | | |
822 | 825 | | |
| |||
0 commit comments