Session Validity for External Facing Components
Jump to navigation
Jump to search
Components embedded outside of salesforce (e.g. MyDocuments, Job Boards, Sessions) now have a new seeting (as of v6.21+) that you can set to define the session validity.
The session validity is usually that of the user elected as the authorization user through the Connected App.
By default, a user's session is 60 minutes (3600 seconds), however if you need to change this behaviour, update the window.globals object as follows:
window['globals'] = {
sessionId: '{!GETSESSIONID()}',
siteUrl: '{!$Site.baseUrl}',
orgUrl: '{!orgUrl}',
sessionValidity: 7200 //2 hrs
}
window['globals'] = globals;
Make sure that the sessionValidity is equal to or less than the Authorized User (through the Authorization Connected App) session length (or when the user is logged out due to inactivity).
Session length validity on the user is controlled by their profile