Adds account parameter#5
Merged
Merged
Conversation
Contributor
hildjj
commented
Oct 23, 2024
- Update dependencies.
- Fixes Add "account" to get/set/delete #4.
- Adds tests.
- Fixes issue where you could not call getPassword twice.
There was a problem hiding this comment.
Pull Request Overview
Adds an optional account parameter to all keychain operations, updates native Swift bindings, tests, and documentation to support multi-account scenarios, and bumps dependencies.
- Extend
setPassword,getPassword, anddeletePasswordAPIs (TypeScript and Swift) to accept anaccountargument. - Update tests and README examples to demonstrate the new
accountparameter. - Upgrade
koffiand various dev dependencies to their latest versions.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/index.ts | Add and verify set/get/delete flows with the account parameter |
| src/index.ts | Extend function signatures and native calls to include account |
| package.json | Bump koffi and development dependency versions |
| Sources/KeychainLibrary.swift | Update Swift keychain functions to accept and use account |
| README.md | Update usage examples to include the account parameter |
Comments suppressed due to low confidence (3)
tests/index.ts:27
- Consider adding a test that calls
getPasswordwithrequireBiometry: trueand anaccountto cover the biometric-protected retrieval flow when using the new account parameter.
const getAccount = await keychain.getPassword({
README.md:37
- The
accountparameter isn’t documented under the Available methods section; update these method listings to includeaccountforsetPassword,getPassword, anddeletePassword.
## Available methods
tests/index.ts:27
- [nitpick] The variable
getAccountholds the retrieved secret; consider renaming it toretrievedPasswordorsecretfor clearer intent.
const getAccount = await keychain.getPassword({
Owner
|
Thanks a lot for this PR, I'm sorry I didn't check at all until now.. but here we are. |
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.