Commit b4a1647
fix(cortex-tui): reload auth token into provider_manager after login (#231)
When a user re-authenticated after session expiration, the new token was
saved to the keyring but never reloaded into the provider_manager. This
caused subsequent API calls to fail with 'session invalid' because the
provider_manager still had the old/expired token (or no token).
The fix adds token reloading in two places in the ToolEvent::Completed
handler for login events:
- After 'login_poll' success (new interactive login flow)
- After 'login' success (legacy chat-based login flow)
This ensures that after any successful login, the fresh auth token is
immediately available for API calls.
Fixes: session invalid error after re-authentication
Co-authored-by: Droid Agent <droid@factory.ai>1 parent fded48b commit b4a1647
1 file changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3012 | 3012 | | |
3013 | 3013 | | |
3014 | 3014 | | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
| 3025 | + | |
| 3026 | + | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
| 3034 | + | |
| 3035 | + | |
| 3036 | + | |
| 3037 | + | |
| 3038 | + | |
| 3039 | + | |
| 3040 | + | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
| 3044 | + | |
| 3045 | + | |
| 3046 | + | |
| 3047 | + | |
| 3048 | + | |
| 3049 | + | |
| 3050 | + | |
3015 | 3051 | | |
3016 | 3052 | | |
3017 | 3053 | | |
| |||
0 commit comments