I am developing an hybrid local app. When the access token expires I must handle the re-login process (actually, I would like to refresh the token just before it expires).
in the auth.js I've seen a quick look at how it "could" work but I didn't find any documentation about this. In particular: creds should be an object with all the credential for the oAuth process. With creds I should then call some method to refresh the tokens. For instance in auth.js to initialize the login process there is something like:
var creds = cordova.require("salesforce/plugin/oauth").getAuthCredentials(); Force.init(creds, null, null, cordova.require("salesforce/plugin/oauth").forcetkRefresh);
What is the call to refresh the token using the forcetk JS library? I've downloaded all the documentation I could find but there no "javadoc" in what I found, could you point me to one?