Commit 620e8f3
TUI: Restore authentication after /logout (#14568)
## Description
Restores a complete authentication path after `/logout` in the headless
TUI.
- Shows an explicit signed-out welcome state and starts device
authorization only after user input.
- Starts fresh device authorization after local logout, then opens a
validated `/logout?continue=…` browser URL so the prior web session is
cleared first.
- Keeps the exact browser URL visible as a manual fallback and returns
to the authenticated TUI without requiring a restart.
- Validates the device continuation as same-origin, exact-path, and
CLI-sourced before passing it to the browser.
This is the client half of the auth-return handshake; the browser
implementation is in warpdotdev/warp-server#13620.
## Linked Issue
None.
- [ ] The linked issue is labeled `ready-to-spec` or
`ready-to-implement`.
- [x] Manual end-to-end verification is documented below.
## Testing
https://www.loom.com/share/2c6d09cb0d0c41658e5a97514f8f347b
- [x] `./script/format --check`
- [x] `./script/check_no_inline_test_modules`
- [x] Presubmit workspace Clippy, default `warp` Clippy, and
`warp_completer` Clippy with warnings denied
- [x] `cargo nextest run -p warp_tui` (906/906 tests passed)
- [x] Full terminal verification: signed-out welcome, unrelated input
ignored, Enter starts device auth, wrapped logout continuation opens,
browser completion returns to the authenticated TUI
- [ ] I have manually tested my changes locally with `./script/run`
The changed surface is the headless TUI, so manual verification used the
real TUI in a full terminal rather than the GUI `./script/run` path.
## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
Co-Authored-By: Oz [oz-agent@warp.dev](mailto:oz-agent@warp.dev)
---------
Co-authored-by: Oz <oz-agent@warp.dev>1 parent d9ed472 commit 620e8f3
8 files changed
Lines changed: 1179 additions & 191 deletions
File tree
- app/src
- auth
- tui
- crates/warp_tui/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
79 | 112 | | |
80 | 113 | | |
81 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
0 commit comments