Skip to content

Add token caching via OS keyring#1

Merged
steipete merged 6 commits intosteipete:mainfrom
Whoaa512:main
Dec 12, 2025
Merged

Add token caching via OS keyring#1
steipete merged 6 commits intosteipete:mainfrom
Whoaa512:main

Conversation

@Whoaa512
Copy link
Contributor

@Whoaa512 Whoaa512 commented Dec 10, 2025

Reduces API auth calls by persisting tokens to macOS Keychain, Linux secret service, or encrypted file fallback. Cached tokens include expiry and userID to skip redundant /users/me calls.

Uses 99designs/keyring for cross-platform support.

still needs some iteration locally. seems to not be saving the token correctly

Reduces API auth calls by persisting tokens to macOS Keychain,
Linux secret service, or encrypted file fallback. Cached tokens
include expiry and userID to skip redundant /users/me calls.

Uses 99designs/keyring for cross-platform support.
@Whoaa512 Whoaa512 marked this pull request as draft December 10, 2025 08:15
Helps diagnose whether cached tokens are being loaded/saved.
Was setting level on local logger instance, not global default.
Helps diagnose rate limits (Retry-After, etc).
Label may be required for macOS Keychain backend.
@steipete steipete merged commit 2aef975 into steipete:main Dec 12, 2025
2 checks passed
@steipete
Copy link
Owner

Taking this over - I added some code to ensure the token is used + tests. Thanks for the help!

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.

2 participants