[GH-ISSUE #451] Separate tokens from config #284

Open
opened 2026-02-28 14:31:53 +03:00 by kerem · 2 comments
Owner

Originally created by @peterhoeg on GitHub (Jan 30, 2024).
Original GitHub issue: https://github.com/jpochyla/psst/issues/451

The problem
I would like to standardize my configuration across machines and thus have $XDG_CONFIG_HOME/Psst/config.json read-only. That is however not possible with the tokens being written there.

Possible solution
If the tokens could be stored in a separate file such as $XDG_CONFIG_HOME/Psst/creds.json or similar.

Alternative solution(s)
I can work around things by using a launcher script that patches config.json but it's pretty ugly.

Additional context
This would also help people who like to keep their config directly in a git (or similar) repository.

Originally created by @peterhoeg on GitHub (Jan 30, 2024). Original GitHub issue: https://github.com/jpochyla/psst/issues/451 **The problem** I would like to standardize my configuration across machines and thus have `$XDG_CONFIG_HOME/Psst/config.json` read-only. That is however not possible with the tokens being written there. **Possible solution** If the tokens could be stored in a separate file such as `$XDG_CONFIG_HOME/Psst/creds.json` or similar. **Alternative solution(s)** I can work around things by using a launcher script that patches `config.json` but it's pretty ugly. **Additional context** This would also help people who like to keep their config directly in a git (or similar) repository.
Author
Owner

@jacksongoode commented on GitHub (Jan 30, 2024):

Is there a standard way of doing this in other applications?

<!-- gh-comment-id:1917706395 --> @jacksongoode commented on GitHub (Jan 30, 2024): Is there a standard way of doing this in other applications?
Author
Owner

@peterhoeg commented on GitHub (Jan 31, 2024):

The problem isn't unique to psst. As an example, davmail allows specifying the path to the token file inside the configuration.

References:

Come to think of it - since many people store a lot of their dotfiles in a repository, if the path isn't configurable, it should probably be under $XDG_STATE_HOME and not $XDG_CONFIG_HOME.

<!-- gh-comment-id:1918612965 --> @peterhoeg commented on GitHub (Jan 31, 2024): The problem isn't unique to psst. As an example, `davmail` allows specifying the path to the token file inside the configuration. References: - https://github.com/mguessan/davmail/blob/2caed4b0664d28f69d572ad21979c24af0207fd9/src/etc/davmail.properties#L27-L28 - https://github.com/mguessan/davmail/blob/master/RELEASE-NOTES.md#o365-4 Come to think of it - since many people store a lot of their dotfiles in a repository, if the path isn't configurable, it should probably be under `$XDG_STATE_HOME` and not `$XDG_CONFIG_HOME`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/psst#284
No description provided.