feat: store auth tokens in OS credential storage#77
Merged
Conversation
There was a problem hiding this comment.
This PR introduces OS-native secure storage for authentication tokens using @napi-rs/keyring, complete with an automatic migration path from legacy plaintext configurations. This is a great enhancement that significantly improves the security of stored credentials while maintaining a seamless user experience. However, there are a couple of edge cases during transient credential manager failures where fallback operations in saving or clearing the token might leave stale secure credentials active once the system recovers.
pedroalves0
approved these changes
Mar 11, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Mar 11, 2026
# [2.10.0](v2.9.1...v2.10.0) (2026-03-11) ### Features * store auth tokens in OS credential storage ([#77](#77)) ([b67a11b](b67a11b))
|
🎉 This PR is included in version 2.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
@napi-rs/keyring.TWIST_API_TOKENas the highest-priority auth source.tokenvalues from config into secure storage while preserving other config fields.User-facing updates
auth login,auth token, andauth logoutmessaging to stop claiming tokens are always stored in the config file.Test plan
First build the CLI in this branch:
Then try the auth commands:
Optional: try signing out and signing back in: