The problem with this is that someone else could enter the gear and still be logged on as you.
While it is possible that they would be kind enough to log you out, theres no guarantee.
Thankfully for anyone in that sort of situation, Slack allows you to close all of your Slack sessions.
Other than the one youre performing the action from.
Obviously, this will sign you out of your other legitimate devices, such as your work phone.
But it will also prevent anyone else from being able to access your account on the shared computer.
To do so, hit your profile picture in the top-right corner, then click View profile.
To access your account prefs, hit your profile picture in the top-right corner, then click View profile.
In your profile, poke the triple-dot icon labeled More, then hit Account controls in the dropdown menu.
choose the triple-dot icon labeled More, then choose Account prefs.
tap on the red button labeled Sign out of all other sessions.
The next page details everything that will happen when you sign out of all your other sessions.
Read the warnings, then slide in your password, and click Sign out all other sessions.