Login for mobile apps/session variables

Login for mobile apps/session variables

  

Hi,

How do I create a login/session variables for mobile apps? I have did some searching on my own and it was recommended that I use local storage. However, this is not a true login system as data is stored on local devices rather than accounts. 

Hi Louie,

You are correct that the data is stored on the device and not in memory, mostly because of the amount of memory available on mobile devices. The local storage is a nice alternative and can be cleared when you logout for instance, which reduces the chance of sharing personal data.

If you want your settings to be shared over different devices, you should use synchronization with a server entity which can be accessed from all devices. 

Hopefully this answers you question/doubt.

Kind regards,

Remco Dekkinga

Hi Remco,

What I am trying to create is a user login system. I need each user to have his or her own set of data. Would it be possible to do that with a server sync? If so, how do I do so?

Regards,

Louie

Hi Louie,

Yes their is a possibility to do that with Offline Data Synchronization Patterns. Here each user can have separate data associated with it which is offline data store in local storage, once you finish your task then Sync your date to database server. 

Hi Louie,

We have login system for mobile app on our apps and basically it works this way:

 - to register user should be online and the process is similar to normal web app.

- on login action there is a synchronisation process to load all necessary data for this user so he can use app even without internet connection.

- on each data change there is a sync process that runs when user is online.

- on logout there is local storage clear script.

- there is a possibility to store user login/password credentials on encrypted local storage and allow user to re/login even if he is offline and logged out accidentally.

Hope this will help :)

Cheers,
Nick