Commit 23a5fdd
authored
fix(auth): pass username argument to OAuth2Flow in auth oauth2 command (#60)
The `auth oauth2` command always passes an empty string to
`OAuth2Flow()`, ignoring any positional username argument. This forces
the flow through `fetchUsername()` which calls `GET /2/users/me` — an
endpoint that has been returning 403 for many developers since the
March 2026 platform regression.
When a username is provided (`xurl auth oauth2 alice`), pass it
through so `OAuth2Flow` skips the broken `/2/users/me` lookup and
stores the token under the given username directly.
Fixes #471 parent e149127 commit 23a5fdd
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
0 commit comments