Could you clarify what you mean by this? What is the session length for your app? How are you handling session expiration there?
Discourse has a maximum session age setting which by default is set to 1440 hours, which is 60 days.
The short version is that if you don’t know the user at the computer has changed, there’s nothing you can easily do to prevent it. You could dial the session length down, or periodically call from your app to log out users, but then if your users are at the computer for longer periods of time, they’re going to find themselves going back through the authentication flow.
Discourse can extend whatever login and session flow you currently use, but without more information on the above it’s hard to see exactly where the problem and any opportunities lie.