How to implement a refresh token process with JWT for Android apps -
i'm working on oauth2 token system access rest api android app. i'm having problems token refreshment part on client side. here flow : app makes request (with access token in parameter) server asynctask ( postcommentasynctask() , addfriendasynctask() etc...), if accesstoken valid it's ok, if has expired call asynctask ( getrefreshtokenasynctask() ) onpostexecute() method of precedent asynctask new accesstoken. here tricky part me. when new access token want re-execute initial asynctask request server. can't figure out how properly. example1 : request postcommentasynctask() --> (acesstoken expired) --> getrefreshtokenasynctask() -->request postcommentasynctask() --> (good token)--> ok edit: i chose use volley library ( no need use asynctask anymore ). use json web token can check expire date wich encoded in payload of token. here isaccesstokenexpired() method check if access token not expired before making request server : publi...