Skip to content

auth refresh: add cookie expiry diagnostics for refreshed status #1882

@jackwener

Description

@jackwener

Context

PR #1881 added opencli auth refresh with best-effort touched status and optional adapter refresh hooks.

Today refreshed is effectively unreachable unless a future site-specific refresh hook returns it. We need generic/adapter-level diagnostics that can compare safe cookie expiry metadata without exposing cookie values.

Goal

Make refreshed meaningful when refresh visibly extends session expiry.

Requirements

  • Never output cookie/token/session values.
  • Only expose safe timestamps/metadata such as cookie_expiry_before / cookie_expiry_after when available.
  • Preserve touched as best-effort success when expiry is opaque or unchanged.
  • Keep not_logged_in / error from updating last_touched_at.
  • Prefer adapter hooks where generic cookie expiry is not reliable.

Validation

  • Unit tests for refreshed vs touched classification.
  • Real-site spot check with @opencli-user when implemented.

Follow-up from PR #1881 / thread #OpenCLI:7bbdfcd2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions