Commit 42e00f7
authored
fix: refresh tokens in approve command when unauthorized (#493)
Fixes #460.
## What changed
- `approve` now handles `Unauthorized` from `list_auth_sessions` by
re-running login, which refreshes tokens when possible.
- After re-login, it retries listing auth sessions once.
- When no sessions are pending, the command now continues to the next
account instead of returning early from the entire command.
## Validation
- `cargo test -p steamguard-cli --bin steamguard`
<!-- PULLFROG_DIVIDER_DO_NOT_REMOVE_PLZ -->
<sup><a href="https://pullfrog.com"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://pullfrog.com/logos/frog-white-full-18px.png"><img
src="https://pullfrog.com/logos/frog-green-full-18px.png" width="9px"
height="9px" style="vertical-align: middle; "
alt="Pullfrog"></picture></a> | [View workflow
run](https://github.com/dyc3/steamguard-cli/actions/runs/24402382941/job/71276260441)
| Triggered by [Pullfrog](https://pullfrog.com) | Using `GPT Codex` |
[𝕏](https://x.com/pullfrogai)</sup>
---------
Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>1 parent 7f6542c commit 42e00f7
1 file changed
Lines changed: 22 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
61 | 71 | | |
62 | 72 | | |
63 | | - | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
0 commit comments