+ Start a Discussion

Hybrid Mobile (cordovia ios) App and session re-authentication after time-out.

While developing an iPhone app, using Cordova and the Salesforce Mobile SDK (backbone, smartstore) where the user is expected to be offline for a prolonged period of time. The problem we are encountering is that during the period of time the user is offline, the Salesforce oAuth session expires, which causes errors when the user reconnects and tries to sync the smartstore back to salesforce.

When a user is logged out, the smartstore storage (soup) is cleared. This is by design by Salesforce for security reasons. However we can find no information about the period of time that the session will remain valid.

What we need is information about how others may have handled this, or information about how we can control the expiration period. Failing that, we need to be able to re-authenticate after a session has expired without clearing the smartstore “soup”.