feat(auth): add the "--purge" option to logout - #251
Merged
Conversation
amoeba
approved these changes
Jan 20, 2026
| } | ||
|
|
||
| func PurgeCredentials() error { | ||
| return os.RemoveAll(filepath.Dir(credPath)) |
Member
There was a problem hiding this comment.
I think it's okay to not get too paranoid about this line of code since, while credPath can be overridden by the user with env var, we always append multiple subdirs to it so even a path traversal attack would be less successful. Thoughts?
Member
There was a problem hiding this comment.
+1, it'd be safer to delete specific files by name
Member
Author
There was a problem hiding this comment.
How's the updated version?
amoeba
approved these changes
Jan 20, 2026
amoeba
left a comment
Member
There was a problem hiding this comment.
Thanks. That's probably good enough.
Member
|
A simple test would be nice. I'm worried that we'll add more files to this location later then forget to have the |
zeroshade
added a commit
that referenced
this pull request
Apr 17, 2026
Add a `--purge` option to `dbc auth logout` which will delete the entire credentials dir (including the `columnar.lic` and `credentials.toml` files). Also, it appears that the auth subcommands were not in the autocompletion scripts so this also adds the appropriate completions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
--purgeoption todbc auth logoutwhich will delete the entire credentials dir (including thecolumnar.licandcredentials.tomlfiles).Also, it appears that the auth subcommands were not in the autocompletion scripts so this also adds the appropriate completions.