flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

Check contains key with readed value

Open koji-1009 opened this issue 1 year ago • 1 comments

The error #711 indicates that SecItemAdd is being called when it should be SecItemUpdate in some users. This could be a case where (for some reason) errSecItemNotFound is returned from SecItemCopyMatching, but the value is actually saved.

Therefore, instead of SecItemCopyMatching, it has been modified to determine if the key is contains based on the value obtained by read. This implementation is based on v9.0.0.

https://github.com/mogol/flutter_secure_storage/compare/v9.0.0...v9.1.0#diff-9ddc98846efcc4fe8d873eb548ed640010457abc988d46a2d2e2d421f8d29045L38


I would like to get your opinion on the modification.

koji-1009 avatar Jun 12 '24 04:06 koji-1009

@juliansteenbakker could you retry the failing action? It succeeds on my machine, would be good to have this fix in this awesome library!

rvdveen avatar Jun 17 '24 09:06 rvdveen

Closed as fixed in #751.

koji-1009 avatar Aug 13 '24 12:08 koji-1009