How to configure sessions in MOBILE.

  

Hi,


As the title says, how I can configure the sessions like through on OnSessionStart in WEB application?

The requirement is I need to set the session timeout from 20mins to 60mins. I managed to do this in WEB. Is it possible to change the session timeout in mobile?


Thanks


Princess Adlawan wrote:

Hi,


As the title says, how I can configure the sessions like through on OnSessionStart in WEB application?

The requirement is I need to set the session timeout from 20mins to 60mins. I managed to do this in WEB. Is it possible to change the session timeout in mobile?


Thanks


There is no session in mobile. Session is for web only because it is stateless where between one request and the other request, in the server side the states are not kept. So, we need session for temporary storage in the server side.

To workaround, may be you can ask a token for every server action that is called from the mobile client, and then keep it in the database- the token id, datetime. Then for another server action called, just read the datetime and if it is more than 20mins... just return error. But, remind that mobile application can work offline also, so the context of "session" is not right in this application type.