You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this library allows saving an account(key)-value in a specific service, which is mapped in iOS in kSecAttrAccount for the key, kSecValueData for the data and kSecAttrService for the service.
However, in a single service, iOS allows saving multiple accounts kSecAttrAccount with their specific value.
This means multiple accounts can be saved. At the moment the library retrieves just the first that is found, and this won't create any problem if we try to store and retrieve a specific account(key)-value data for a specific service, if that was stored using this library.
However, if we try to retrieve some values saved from either a different application or a different library (e.g. consider a migration from a previous version of the app or sharing the keychain with another application), we could incur into a problem because we will always retrieve the first account and we won't be able to access the specific account we are interested into.
The solution would be to either specify the account we need to access as an optional parameter for the getGenericPassword or create a completely different method to specify more options and give developers more freedom.
@oblador and @mantainers, do you have any thoughts about this?
The text was updated successfully, but these errors were encountered:
I have the same issue, would be nice if we could pass the account to retrieve specific entries and not just the first one.
I am stuck, because I am trying to upgrade from a previous version of the app. And with this library I can only fetch the first value. If the user has had multiple accounts, there is no way to fetch the latest one currently.
I have not released this as a npm package, I am referring to it by URL in my package.json file. If @oblador will accept a PR I will gladly prepare one.
Currently, this library allows saving an account(key)-value in a specific service, which is mapped in iOS in
kSecAttrAccount
for the key,kSecValueData
for the data andkSecAttrService
for the service.However, in a single service, iOS allows saving multiple accounts
kSecAttrAccount
with their specific value.This means multiple accounts can be saved. At the moment the library retrieves just the first that is found, and this won't create any problem if we try to store and retrieve a specific account(key)-value data for a specific service, if that was stored using this library.
However, if we try to retrieve some values saved from either a different application or a different library (e.g. consider a migration from a previous version of the app or sharing the keychain with another application), we could incur into a problem because we will always retrieve the first
account
and we won't be able to access the specific account we are interested into.The solution would be to either specify the
account
we need to access as an optional parameter for thegetGenericPassword
or create a completely different method to specify more options and give developers more freedom.@oblador and @mantainers, do you have any thoughts about this?
The text was updated successfully, but these errors were encountered: