Closed AndydeCleyre closed 3 years ago
Although this would be a nice utility to have, you don't really need LyricsGenius to do this. You can easily use Python's standard library configparser to parse your config file and extract your token. We'd just do the same if we added this option to LyricsGenius. If you'd like to add this feature, a PR is more than welcome.
To be clear, this request is regarding use of the CLI.
In the case of the CLI, we could add alternate paths to check for a token as I've seen other projects do that.
But is the token any safer in a file rather than as an environment variable? It seems that an env var might be the safest and the most convenient option.
I'm closing this issue as it seems to be solved. Feel free to comment here if you have anything else to add.
Is your feature request related to a problem? Please describe. I would like to provide the token via a file, without exposing the credential as an environment variable (or as part of the command), to better manage security.
Describe the solution you'd like When using the CLI:
GENIUS_ACCESS_TOKEN
in environment, use that${XDG_CONFIG_HOME:-~/.config}/LyricsGenius/access_token
or similarDescribe alternatives you've considered I can use a shell file and source that, but the credential will still be exposed as an environment variable.