I would like to receive your feedback regarding the authentication mechanism for the application using PhoneGap and Sencha Touch and a server in .NET with Active Directory.
So, we need to save the user credentials on the mobile device so that the user does not have to re-enter Login and Psw, every time he wants to use the application.
01 - IDEA - Cookies
In my understanding, Sencha Touch does not have direct libraries for managing cookies. To use cookies, I have to install the "Sencha Ext Js" base library for Sencha and use the Ext.util.Cookies Class. This library should not be free.
I am afraid to still have problems with CROS domains regarding the handling of cookies and the IOS security issue.
Also, Phonegap does not provide cookie abstractions, as there are many other tools that can be done already (Phonegap simply wraps the functionality of the smartphone, and not the basic functions of the browser). I can use potenticalyy jQuery and maybe try the jquery cookie plugin.
02 - IDEA - HTML5 Local Storage
Sencha Touch offers an API for HTML5 local storage, so instead of writing a cookie, I can save the credentials in local storage. Local data should be stored by the browser for the undefined resource, if time, even if the device is turned off. When the user clicks on the application, I can take local data and send it to the server, the server will authenticate the user.
, .
A)
- , Cookie . , . : Cookies , .
)
- UserName , Pasword " " Cookie . " ". PRO: , CONS: , . . . Machine.config .
: