forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

refresh token expired

johnjeremih opened this issue · comments

commented

Is there a method to refresh the token instead of logging the user out and letting them sign in back in?

When the access token expires, we use the refresh token to get a new one. It happens transparently to the application. The RestClient class intercepts the 401 returns by the server, uses the refresh token to get a new access token and then re-plays the request that got the 401. When the refresh token has expired or got revoked, then you must login again to get a new refresh token. Typically, you would configure the refresh token policy for your connected application to never expire.