Repository navigation
feat: auth commands: login, status, logout and token under auth - #46
Merged
Merged
Conversation
This was referenced Oct 14, 2026
Closed
|
Claude finished @alukach's task in 25s —— View job ✅ No blocking issues — safe to merge. I read the full diff (
Non-blocking notes:
Simplify (ponytail)
💰 Estimated review cost: $0.18 · 0m25s · 9 turns |
This was referenced Oct 14, 2026
Closed
alukach
force-pushed
the
feat/auth-commands
branch
2 times, most recently
from
October 14, 2026 21:23
3d829e9 to
f9d47a9
Compare
- auth login (the top-level login still works, hidden): records the account from /whoami (--api-url) and when the refresh token was issued. - auth status: environment, login state, account and profile link, when the refresh token was renewed and when it expires if unused (Ory's refresh tokens are opaque and its token response gives no lifetime, so this is estimated from 30 days, or SOURCE_REFRESH_TOKEN_LIFETIME), each token's expiry, and the role's credentials; --json gives the same as data, with estimated_lapse_at and assumed_lifetime. - auth logout: removes an environment's session and a role's cached credentials. - Hints now say 'source-coop auth login'. Built on the shared foundation (api client, failure/exit codes, output::json, style). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alukach
force-pushed
the
feat/auth-commands
branch
from
October 14, 2026 21:38
f9d47a9 to
3ac2976
Compare
…gout takes --json - A refresh token past its provider-given expiry makes the login expired. - auth status no longer copies legacy credentials into the environment's slot. - An unreadable SOURCE_REFRESH_TOKEN_LIFETIME is warned about, not fatal. - auth login notes an unusable --api-url instead of silently skipping the account. - auth logout --json reports what it removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…account - auth status counts a login expired once its refresh token's expiry, or the estimate where the provider gives none (Ory), has passed. One refresh_expiry feeds the state, the human report and --json. - auth login saves the session and credentials before looking up the account, and looks it up at the API its token is for (--audience). Its --api-url, new in this branch, is gone. - auth logout for production leaves another environment's legacy entry in production's slot alone. - auth login is listed among the commands without --json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in lookup timeout, logout removes the file copy - auth status: past only the estimated lapse, the login is likely_expired (yellow) and logged_in stays true; a provider-given expiry still ends it. - A refresh lifetime of 0 (Keycloak's "never") is an unknown expiry. - auth login gives the account lookup 10s. - Removing a cached slot deletes its file even when the keyring fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alukach
marked this pull request as ready for review
October 14, 2026 22:42
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Signing in lives under
auth:auth login: the browser login. The top-levelloginkeeps working as a hidden command, so scripts and habits don't break. It records:/whoamiat--api-url/SOURCE_API_URL;auth status: environment, login state, account and profile link, each token's expiry, and the role's cached credentials.renewed <time> (<ago>); expires <day> (in N days). Ory's refresh tokens are opaque and its token response gives no lifetime (verified: onlyaccess_token, expires_in, id_token, refresh_token, scope, token_type).SOURCE_REFRESH_TOKEN_LIFETIME. That setting only affects the display; nothing sent at login depends on it.--json: the same as data, includingprofile_url,estimated_lapse_atandassumed_lifetime.auth logout: removes an environment's login session and a role's cached credentials.auth token: prints the API access token, as before.source-coop auth login.Testing
cargo testandcargo test --features staging: 64 passed. Covers status rows and JSON, the lifetime estimate and override, relative times,loginstill working by its old name, the account coming from/whoami, logout's file removal, and refresh tracking through rotation.cargo clippy --all-targets -- -D warnings(both builds): clean.auth statusand--jsonagainst a file-cached session in a temporaryHOME, so no keychain entry was read.🤖 Generated with Claude Code