okta / okta-storage-swift

Secure storage library
https://github.com/okta/okta-storage-swift
Other
8 stars 8 forks source link

Remove SecItemDelete/SecItemAdd pair and change with SecItemUpdate #20

Closed IldarAbdullin-okta closed 3 years ago

IldarAbdullin-okta commented 3 years ago

Problem Analysis (Technical)

Update API requires 2 transactions - SecItemDelete and SecItemAdd

Solution (Technical)

More reliable solution is to use atomic SecItemUpdate call

IldarAbdullin-okta commented 3 years ago

Looks good, do we feel that this is adequately covered in unit tests?

Absolutely. There are existing tests that testing update scenarios