Commit ca0b549
committed
fix(cli): prevent false user-attended mode warning with federated auth
When using OIDC federated authentication (e.g., GitHub Actions), the CLI
incorrectly showed a "User-attended mode detected" warning. This happened
because loadAuthToken() returned isUserToken=true when no API token was
configured, and federated auth discovery never updated this flag.
Two fixes applied:
- Set isUserToken=false after obtaining a federated token, so the flag
correctly reflects the authentication method
- Guard the confirmation prompt with authToken != "" to skip it entirely
when no token is available, preventing the prompt from showing in
unauthenticated scenarios
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Entire-Checkpoint: 1ff68ba64bcc1 parent c968cba commit ca0b549
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
| |||
168 | 170 | | |
169 | 171 | | |
170 | 172 | | |
171 | | - | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
0 commit comments