jamesmontemagno / SettingsPlugin

Read and Write Settings Plugin for Xamarin and Windows
MIT License
324 stars 80 forks source link

[Feature Request] Settings plugin - Secure storage for sensitive data (passwords, etc) #9

Closed jamesmontemagno closed 8 years ago

jamesmontemagno commented 8 years ago

From @daniel-luberda on September 7, 2015 15:24

It would be very nice to have secure settings storing functionality for things like passwords, session tokens, etc implemented with platform specific API's ensuring security. It could be done just the same as Xamarin.Auth plugin account storing (backed by the Keychain on iOS and a KeyStore on Android). What do You think about it?

Copied from original issue: jamesmontemagno/Xamarin.Plugins#106

jamesmontemagno commented 8 years ago

Would it just be strings?

Also does Windows have anything like this?

jamesmontemagno commented 8 years ago

From @daniel-luberda on September 9, 2015 22:41

Actually, it could be possible to store serialized objects but I don't really know if it's needed. The limits for text size for iOS Keychain and Android Keystore are quite large (eg. see: http://stackoverflow.com/questions/13488793/is-there-any-length-limit-of-string-stored-in-keychain).

On Windows there's PasswordVault for passwords and Data Protection API (DPAPI) for larger files https://msdn.microsoft.com/en-us/library/windows/apps/windows.security.credentials.passwordvault.aspx and https://msdn.microsoft.com/en-us/library/windows/apps/hh464970.aspx

for Xamarin iOS example: https://github.com/xamarin/Xamarin.Auth/blob/master/src/Xamarin.Auth.iOS/KeyChainAccountStore.cs

for Xamarin Android example: https://github.com/xamarin/Xamarin.Auth/blob/master/src/Xamarin.Auth.Android/AndroidAccountStore.cs

Experimental Windows phone store (I don't know what is used there): https://github.com/xamarin/Xamarin.Auth/blob/experimental-winphone/src/Xamarin.Auth.WindowsPhone8/WPAccountStore.cs

jamesmontemagno commented 8 years ago

From @alexrainman on December 4, 2015 23:33

This plugin do something like that. I haven't tested. Don't know if works from PCL https://github.com/has-taiar/KeyChain.Net

jamesmontemagno commented 8 years ago

From @sameerkapps on February 2, 2016 3:13

Just published this one for securely storing strings. Please check it out. http://www.nuget.org/packages/sameerIOTApps.Plugin.SecureStorage/