0

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.

  • hope this custom module might help https://www.drupal.org/node/801280 create extend_login_links module for fixing your problem – Viswanath Polaki Oct 01 '17 at 17:22
  • For those who are having this problem, refer to: https://drupal.stackexchange.com/questions/125259/why-is-session-cookie-lifetime-set-to-23-days – Tor Learner Dec 12 '17 at 00:46

0 Answers0