Session Management

2 posts, 0 answers
  1. developer4
    developer4 avatar
    1 posts
    Member since:
    Nov 2013

    Posted 19 Feb 2014 Link to this post

    Hi There

    In the Icenium Hybrid app we have a requirement like we need to keep the logged in user's session active for about 8 hours and then log-out automatically.
    The app is connecting to the Servicestack REST services which also handles sessions at the server side.

    How do we handle the session management on the device as well as server side?. any examples are highly appreciated.

    Thank you
  2. Steve
    Steve avatar
    10941 posts

    Posted 19 Feb 2014 Link to this post

    Hello Xyler,

    If we understand correctly, your users authenticate in your application with session/cookies. So basically you can save the cookies in the local storage. When application gets restarted, you'll read them from the local storage and set the cookies when making ajax calls. In short the workflow is:
    1. Read the session cookies upon successful login.
    2. Save them to local storage.
    3. Set the cookies when making requests to your server.

    Another option might be to use a custom Cordova plugin to handle the cookies, see this thread.

    Icenium is now Telerik AppBuilder, and is part of the Telerik Platform. For more information on the new name, and to learn more about the Platform, register for the free online keynote and webinar on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT)
Back to Top