fix: Fix Windows credential storage via windows-native keyring feature#6
fix: Fix Windows credential storage via windows-native keyring feature#6
Conversation
📝 WalkthroughWalkthroughThe keyring crate dependency in Cargo.toml now enables the "windows-native" feature alongside existing features. This is a single-line dependency configuration update affecting platform-specific functionality. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the Rust dependency configuration so the CLI can use the Windows Credential Manager backend via keyring when running on Windows, avoiding cases where bl auth login does not persist the API key.
Changes:
- Enable the
keyringcrate’swindows-nativefeature inCargo.toml. - Regenerate
Cargo.lockto include the newly-resolved transitive dependencies (e.g.,windows-sys,byteorder).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Cargo.toml | Enables keyring’s Windows backend feature to support Credential Manager. |
| Cargo.lock | Updates lockfile to reflect the dependency graph after enabling windows-native. |
Addresses review comment: "windows-native expands the dependency graph for all platforms unnecessarily"
Verifies that platform-specific Windows dependencies (windows-native keyring feature) compile correctly on windows-latest.
Checklist
mainSummary
Fix credential storage on Windows by adding the
windows-nativefeature to thekeyringcrate, which enables Windows Credential Manager as the backend.Reason for change
After the v0.1.3 release, real-device testing on Windows revealed that
bl auth logincompleted without error but credentials were not actually stored — causingbl auth statusto fail with "API key not found". The root cause was that theasync-secret-servicefeature (Linux D-Bus) was the only backend enabled; withoutwindows-native, the keyring crate had no working backend on Windows and silently returnedOk(())instead of storing anything.Changes
Cargo.toml: Addwindows-nativekeyring feature as a Windows-only platform dependency ([target.'cfg(windows)'.dependencies]) to avoid expanding the dependency graph on Linux/macOS.github/workflows/check-rust.yml: Addcheck-windowsjob onwindows-latestto catch platform-specific compilation issues earlyNotes
Cargo.lockrecords dependencies for all target platforms regardless of the build host, so the single lock file works correctly for both Linux CI and Windows CI with--locked.