Drupal Services Token Lifetime

110 Views Asked by At

We have built a mobile app using Phonegap.

The login flow is as follows:

  • User logs in with username/password
  • Services returns a token
  • Token is saved locally using localstorage
  • All future requests are made with this token without issues

Now this is where we are having issues: - We close the app for several days - Re-open the app - Attempt to perform a request using the token saved in localstorage - Now we are getting a response saying "Anonymous users do not have permissions...."

My question is, what is the lifetime of a token? Is there a way to check the validity of a token?

I have been struggling with this for weeks now.

0

There are 0 best solutions below