Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout doesn't work #177

Closed
Spikhalskiy opened this issue Jan 13, 2023 · 4 comments · Fixed by #178
Closed

Logout doesn't work #177

Spikhalskiy opened this issue Jan 13, 2023 · 4 comments · Fixed by #178

Comments

@Spikhalskiy
Copy link

Spikhalskiy commented Jan 13, 2023

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
@rusq
Copy link
Owner

rusq commented Jan 13, 2023

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.

@Spikhalskiy
Copy link
Author

Spikhalskiy commented Jan 13, 2023

@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.

@rusq
Copy link
Owner

rusq commented Jan 13, 2023

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!

@rusq rusq closed this as completed in #178 Jan 13, 2023
@rusq
Copy link
Owner

rusq commented Jan 13, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants