Repository navigation
Conversation
|
Claude finished @alukach's task in 18s —— View job ✅ No blocking issues — safe to merge. I read the diff against
Simplify (ponytail)
💰 Estimated review cost: $0.16 · 0m18s · 5 turns |
`source-coop auth status` reports, for one environment and role, whether you're logged in (refresh token, ID and access token expiry) and when the role's cached credentials expire. It reads the cache only: nothing is refreshed and nothing goes over the network. --proxy-url and --role-arn pick the environment and role, as for creds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
alukach
force-pushed
the
feat/status-command
branch
from
October 14, 2026 16:29
bf7a1f3 to
b834701
Compare
Closed
alukach
added this pull request to stack #25
October 14, 2026 16:39
auth login now asks the API's /whoami who the new access token acts as (--api-url, SOURCE_API_URL) and keeps the account in the session, so auth status can name it without going to the network. A failed lookup is noted, not an error, and a session from before says it's unknown until the next login. auth status shows one row per item, laid out like product view: dim labels, the login state green or red, the account ID gray, and a past expiry yellow, on a terminal and without NO_COLOR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… was renewed auth status adds a Profile row (the account on the site the login was for) and says when the refresh token was last renewed, with its expiry where the provider gives one. Ory's refresh tokens are opaque and their lifespan is its own setting, restarted at each renewal, so the renewal time is what can be known. The session records it, and the expiry when given (refresh_token_expires_in / refresh_expires_in), as optional fields that older sessions read without. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ory's token response gives no refresh-token lifetime (only the access
token's expires_in) and its refresh tokens are opaque, so auth status
estimates: the last renewal plus a lifetime, 30 days by default (Ory's
default oauth2.ttl.refresh_token) or SOURCE_REFRESH_TOKEN_LIFETIME, worded
as an estimate ("if unused, lapses around <day> (assuming a 30d
lifetime)"). An expiry the provider gives is shown instead. The lifetime
only feeds this estimate; nothing sent at login depends on it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"renewed <time> (<ago>); expires <when> (in <n> days)", or "expired <when> (<n> ago)" in yellow, instead of "yes, renewed …; if unused, lapses around … (assuming a 30d lifetime)". An estimated expiry is given to the day; one the provider gave, to the second. The README still explains that the estimate assumes a lifetime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
Contributor
Author
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.
Rebuilt on #24, under
auth(#24 movedlogintoauth login). Replaces this PR's earlier top-levelsource-coop status.What
source-coop auth statusreports, for one environment and role, whether you're logged in, as whom, and when things expire:Who's logged in:
auth loginnow asks the API's/whoamiwho the new access token acts as (new--api-url/SOURCE_API_URL) and keeps the account in the session (Session.account, optional, so old sessions still load).auth statusnames it without going to the network. A failed lookup is noted at login, not an error. A session from before this says "unknown until your nextauth login".Layout: one row per item, like
product view. On a terminal (and withoutNO_COLOR) labels are dim, the login state is green or red, the account ID is gray, and a past expiry is yellow.Reads the cache only: nothing is refreshed and nothing goes over the network. It always exits 0.
--proxy-url/SOURCE_PROXY_URLand--role-arn/SOURCE_ROLE_ARNpick the environment and role, as forcreds. The keyring can't list its entries, so it reports on one of each.The report is a pure function (
status_report), so it's unit-tested without the keyring.README has a "Checking login status" section.
every_command_is_in_the_readmerequires it.Testing
status_names_who_is_logged_in,status_says_when_the_account_is_unknown_or_nobody_is_logged_in,status_colours_labels_and_the_login_state,the_account_comes_from_whoami, andlogin_looks_up_the_account_only_with_an_access_token(wiremock).cargo fmt,cargo clippy --all-targets -- -D warnings,cargo testandcargo test --features staging: 93 passed.auth statuswithHOMEin a scratch folder, so the real keychain was never read: "not logged in" / "no cached credentials".🤖 Generated with Claude Code