X-Appery-Session-Token header is missing after app is left idle

Hi, I have a problem with one app where the X-Appery-Session-Token header is missing after the app is left unused for a couple of minutes.

My app's login process uses the UserDB Appery cloud database. All business logic is executed through API Express web services.
The error is reported after a user leaves the phone idle for a couple of minutes (on any screen), once back any action returns an error, and the navigation now only displays empty data. The actual error I'm getting says:
Code: AE002
Message: Incorrect or absent X-Appery-Session-Token header
Status: FORBIDDEN

How can I make sure the session token does not expire so fast? Where is this configured on the server side?

Thanks,
Christian
1 person has
this question
+1
Reply
  • Hello Christian,

    Could you please clarify, what project type do you use there (Ionic or JQM)? How do you save the session Token? Please check the app, it might reset the user's sessionToken.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • Hi Serhii,

    We are using Ionic, we actually hired your team to develop this. We are using a Custom Login process, the app login is never lost, the API Express token is lost (and not after 2 hours, if we leave the app inactive for 20 minutes it's already lost) and all the web services calls start to fail.

    I fixed it by storing the user name and password locally, I'm now checking the connection to see if the token is already lost and automatically re-connecting when that happens. This is the only work-around I found.

    Where would I check if the app is resetting the session Token? From the client code it's not resetting it, let's say I leave the app idle for 20 minutes and then come back and start navigating, I push a button that just executes a web service and that already returns the lost token message. Unless there's server code resetting it, is that possible?

    Thanks,
    Christian
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated