rusq / slackdump

Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logout doesn't work

Spikhalskiy opened this issue · comments

Describe the bug

Based on the readme and man, I would expect -auth-reset flag to log out, so next time I may be able to login into a different account. But the logout doesn't happen and instead, I'm asked for the desired action like I didn't supply the -auth-reset flag at all.

Actual behavior

~ ./slackdump -auth-reset
Slackdump v2.2.6 Copyright (c) 2018-2022 rusq (build: aed101a)

? What would you like to do?  [Use arrows to move, type to filter]
> Dump - save a list of conversations
  Export - save the workspace or conversations in Slack Export format
  List - list conversations or users on the screen
  Emojis - export all emojis from a workspace
  Exit - exit Slackdump and return to the OS

The next interaction doesn't offer a login and behaves as if I'm still logged in.

Expected behavior

./slackdump -auth-reset should logout and immediately exit without providing the options of what I would like to do.

Desktop (please complete the following information):

  • OS: MacOS 13.1
  • Slackdump v2.2.6
commented

Hey @Spikhalskiy, thanks for your enquiry.

Regardless of what you see on the screen, it does log you out. If you try and select any of the menu options, for example, run the list of users, you will be asked to login.

The reason why you see the menu is that you haven't provided any "mode" options, as this flag is not stand-alone, and is meant to work with the mode flags.

For example, if you run:

./slackdump -auth-reset -u

(and you don't have a "secrets.txt" or ".env" file with token/cookie), you will be asked to login.

I appreciate that it's not immediately clear. The auth workflow has changed in v3 (it's currently WIP): the credentials control is made more concise. V3 will introduce a "workspace management", where one can be logged in at multiple workflows (as per #121 ).

Let me know if you have other questions.

@rusq Thank you for the answer! I concur that it will ask me to login if I select one of the options 1-4 immediately.
But if I select "Exit - exit Slackdump and return to the OS" option or press Ctrl+C, the logout doesn't happen and the next ./slackdump -c call doesn't require authorization and executes like logout never was requested.
So it looks like there is no command to just log out. I can log out only by requesting something else to be done. Which is... tricky.
But thanks for the clarification, looking forward to v3.

commented

You made a very good point, after I wrote my message, I realised, that if one chooses "Exit", nothing happens 😂 #178 fixes this, thank you for the report!

commented

There release binaries should be ready in couple of minutes: https://github.com/rusq/slackdump/releases/tag/v2.2.7