Does corona API provide a way to control user session? or what is your approach?

Hi all,

I am new, and looking for a way to control user session in my app. I was searching around and didn’t find people discuss about this topic and I don’t find corona API can handle it (or probably i missed it).

so I was thinking to it as the following way, and want to share with everyone and gather some feedback. 

I am thinking to use this tutorial:

http://coronalabs.com/blog/2013/05/28/tutorial-goodbye-globals/#comment-116808

and create a table to hold my user session, so I can always check the permission against my “global variables” i created.

What do you guys think? and what is your way?

Any feedback is appreciated!

Thanks!

Edwin

That’s basically the way I handle it…  :slight_smile:

Thanks Ingemar, 

Do you mind also share with me how you handle more sensitive data between your app and server? Do you use JSON? or is there other better way?

Thanks

Edwin

JSON can be a good way to bundle data into manageable units, however it doesn’t add any extra security. It’s still plain text.
If I have sensitive data that shouldn’t be readable I usually use MD5 hashes.

I see. Thanks Ingemar.

That’s basically the way I handle it…  :slight_smile:

Thanks Ingemar, 

Do you mind also share with me how you handle more sensitive data between your app and server? Do you use JSON? or is there other better way?

Thanks

Edwin

JSON can be a good way to bundle data into manageable units, however it doesn’t add any extra security. It’s still plain text.
If I have sensitive data that shouldn’t be readable I usually use MD5 hashes.

I see. Thanks Ingemar.