0

We have a connected app which is android mobile app. We want the Users using that app to force logout of the app and re-login again. To do so, I have given the session time out value to 15 mins in connected app and session settings and set "force logout on session end" to true, even then, the User is logged in when I checked after 15 mins. even then, the User is logged in when I checked after 15 mins.

When I revoke the access for the user by manually revoking or immediately expiring the refresh token, when the app is opened, I am getting the error as "Check your internet connection" rather than user logout

Is there any way to force logout User from Connected App

  • Is this a custom app using the Salesforce Mobile SDK (if so what version?), a Salesforce App from the Playstore or something else? – Brandon Page Jan 3 at 16:57
  • It's a Custom app using the Salesforce Mobile SDK – Skumar Jan 5 at 3:04
  • And this is on a new login? The SDK only checks the connected app settings/policies once (upon initial login). It is possible the app to update it as frequently as you want, it's just not there out of the box. And what version of the SDK are you using? – Brandon Page Jan 6 at 16:55
  • Yes @Brandon. and is there any way to filter android and IOS users in the app. I can find them in user detail page but i need to fiter out in bulk – Skumar Jan 9 at 7:39
0

https://help.salesforce.com/articleView?id=connected_app_manage_session_policies.htm&type=5

Just to make sure. This is where you would set the timeout value for the Connected App:

enter image description here

Otherwise, it'll take the value of the Profile session settings for timeout and then the Org settings.

You can control how long a user’s session lasts by setting the timeout value for the connected app, user profile, or org’s session settings (in that order). If you don’t set a value or you select None (the default), Salesforce uses the timeout value in the user’s profile. If the user’s profile doesn’t specify a timeout value, Salesforce uses the timeout value in the org’s Session Settings.

The other important question is how you're testing? Be aware of how Salesforce determines whether a user is still active or not as it won't be exactly 15 minutes depending on the circumstances:

The last active session time value isn’t updated until halfway through the timeout period. So if you have a 30-minute timeout, the system doesn’t check for activity until 15 minutes have passed. For example, if you update a record after 10 minutes, the last active session time value isn’t updated because there was no activity after 15 minutes. You’re logged out in 20 more minutes (30 minutes total), because the last active session time wasn’t updated. Suppose that you update a record after 20 minutes. That’s 5 minutes after the last active session time is checked. Your timeout resets, and you have another 30 minutes before being logged out, for a total of 50 minutes.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.