Skip to content

feat: add --expires flag for session auth expiration#51

Merged
broody merged 3 commits intomainfrom
feat/session-account-lookup
Feb 26, 2026
Merged

feat: add --expires flag for session auth expiration#51
broody merged 3 commits intomainfrom
feat/session-account-lookup

Conversation

@broody
Copy link
Collaborator

@broody broody commented Feb 26, 2026

Summary

  • Add --expires flag to session auth for custom session expiration durations (e.g., 1min, 1hr, 7days, 1week, 1year). Defaults to 7days.
  • Parses human-readable duration, converts to unix timestamp, and appends as expires_at query param to the session request URL.

Test plan

  • controller session auth --preset loot-survivor --chain-id SN_SEPOLIA --expires 1hr produces URL with correct expires_at param
  • controller session auth --preset loot-survivor --chain-id SN_SEPOLIA defaults to 7 days expiration
  • Invalid durations (e.g., --expires 5blah) return clear error messages

🤖 Generated with Claude Code

Allows clients to specify session expiration using human-readable
durations (e.g., 1min, 1hr, 7days, 1week, 1year). Defaults to 7days.
The duration is converted to a unix timestamp and appended as
expires_at to the session request URL.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@broody broody force-pushed the feat/session-account-lookup branch from ddd7bd2 to e28645e Compare February 26, 2026 22:53
@broody broody changed the title feat: add --expires flag and --account lookup for session auth feat: add --expires flag for session auth expiration Feb 26, 2026
broody and others added 2 commits February 26, 2026 13:09
Shows the --expires value (e.g., "7days") in both human-readable
and JSON output when authorizing a session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@broody broody merged commit 78d909a into main Feb 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant