Allow executing program to retrieve credentials
* config / authentication: permit to call external program for getting credentials You can add into your ncspot/config.toml like this: ``` creds_username = "mylogin" creds_passeval = "pass my_pass_path_to_spot_password" ``` Or using any password manager who send your password.to stdout. If a newline is detected it will be automatically removed * Move credential commands into separate structure Also add an option for a username command * Document credential commands --------- Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
This commit is contained in:
16
README.md
16
README.md
@@ -62,6 +62,7 @@ You **must** have an existing premium Spotify subscription to use `ncspot`.
|
||||
- [Notification Formatting](#notification-formatting)
|
||||
- [Cover Drawing](#cover-drawing)
|
||||
- [Authentication](#authentication)
|
||||
- [Using a password manager](#using-a-password-manager)
|
||||
|
||||
## Resource Footprint Comparison
|
||||
|
||||
@@ -608,3 +609,18 @@ The credentials are stored in `~/.cache/ncspot/librespot/credentials.json`
|
||||
|
||||
The `logout` command can be used to remove cached credentials. See
|
||||
[Vim-Like Commands](#vim-like-commands).
|
||||
|
||||
### Using a password manager
|
||||
|
||||
If you would like ncspot to retrieve your login data from command results,
|
||||
i.e. because you use a password manager like `pass`, you can add the following
|
||||
configuration:
|
||||
|
||||
```toml
|
||||
[credentials]
|
||||
username_cmd = "echo username"
|
||||
password_cmd = "pass spotify.com/username"
|
||||
```
|
||||
|
||||
Do note that this is only required for the initial login or when your credential
|
||||
token has expired.
|
||||
|
||||
Reference in New Issue
Block a user