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

Add logout command #11

Open
mbonaci opened this issue Feb 5, 2019 · 2 comments
Open

Add logout command #11

mbonaci opened this issue Feb 5, 2019 · 2 comments

Comments

@mbonaci
Copy link
Member

mbonaci commented Feb 5, 2019

Now that users have to choose region during login, we should allow them to logout from the active session in order to switch between regions and Log applications.

Currently, the only way to force logout (short of waiting 30 min) is to manually delete the session config file at ~/.config/configstore/logsene/<user>.json or to remove apiKey and/or token from it.

@otisg
Copy link
Member

otisg commented Feb 5, 2019

Could/should the implementation just delete that file then?

@mbonaci
Copy link
Member Author

mbonaci commented Feb 5, 2019

We keep some across-sessions params there that user can set, like default-size, range-separator and trace.
It's even simpler than having to deal with files - we'll just invoke configSet with empty value for apiKey, token and region.
(Implementation detail: configSet should in turn invoke existing function config.deleteSync when value is empty)

Any command after this will ask user to login first.

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

No branches or pull requests

2 participants