title: Authentication at server side
body: <p>I have implemented custom authentication token implementation at server  side(Rest jersy) like generating custom token and store it in redis with token expiry date. but problem is that when request comes, check client token with redis token if valid and check expiry if expires then generate new token and send that newly generated token to client(android or ios mobile app) but some times, response is not reached to client(newly generated token) due to user click on some other activity at android app side and server already generated new token and client left with old token so when client makes new request at that time it comes with old token and server has new token so its not validated. so how to be ensure that token is reached to client when new token is generated at server side?</p>
  
  <p>Thanks,       </p>