The secure storage plugin is used to store data in the "encrypted" area of the phone.
In the case of iOS it can become problematic because that area is not deleted when the app is uninstalled.
If you only want to save it to have persistence from one use to another you can use Plugin.Settings that saves it in what would come to be the preferences.
In any case I am not very happy with using tokens to keep sessions in mobility.
What I usually do is that when I start the app or when I restore it, it relogs the user, to verify that their credentials are still valid. If the login is correct I let it pass transparently, and if I do not return it to the login screen and delete the credentials.
To save username and password if you should use that plugin that you comment.
EDITING
Example of using Plugin.Settings:
When you install the plugin, you create a Settings file in the Helpers folder in all the projects. If you are in forms you only need the PCL project.
In this project you have properties like:
private const string usuario = "usuario";
public static string SettingsUsuario
{
get { return AppSettings.GetValueOrDefault(usuario, SettingsDefault); }
set { AppSettings.AddOrUpdateValue(usuario, value); }
}
From that moment you can call save or record by calling the property
But I do not know if that goes for what you want.
The "general" standard you should use is
- User configuration that does not matter whether it is safe or not
Plugin.Settings.
- User settings that you need to save
secure to Secure Storage
- Content of the application that has use
(created, deleted, updated) to Sqlite.