You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d22be3f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(oauth): revoke replaced sessions and keep credentials out of the CLI and logs (#1147)
Clean up replaced OAuth sessions without forcing a re-login when required
scopes change, offer OAuth only when the deployment can register clients,
and stop host credentials and secrets from leaking into CLI calls and logs.
- Keep tokens missing required scopes until they expire, but stop
refreshing them; normal 401 recovery applies after expiry.
- Revoke the replaced OAuth session in the background after a successful
sign-in; failed or canceled sign-ins and same-token reuse revoke nothing.
- Record the registration each session's tokens were issued to, so refresh
and revocation keep working when another window re-registers; save a new
registration only after login succeeds.
- Preserve refresh credentials, scopes, and registration when reusing the
same token; a session rotated by a concurrent refresh wins.
- Request `user:update_personal` so `coder start` can refresh expired
external-auth links.
- Offer OAuth only when discovery advertises `registration_endpoint`, which
Coder omits while dynamic client registration is off (the default from
2.37); a notice explains the session-token fallback.
- Spawn CLI processes without `CODER_SESSION_TOKEN` in any letter case or
with the `HOMEBREW_` prefix; the SSH ProxyCommand with
an empty `--token=`, since the extension can't set its environment.
- Redact credentials from every logged value, in the output channel and the
connection log buffer, and summarize Axios errors at any depth.
Closes#1140
0 commit comments