dropbox / dbxcli

A command line client for Dropbox built using the Go SDK
Other
1.05k stars 100 forks source link

Add feature for adding keys by environment variables #107

Closed vaithak closed 5 years ago

vaithak commented 6 years ago

Fixes #104 .

vaithak commented 6 years ago

@diwakergupta Please review my PR.

vaithak commented 5 years ago

@diwakergupta I have made the requested changes, now the keys can be accessed through env variables without build failure in official release. Please review my PR.

clarkewd commented 3 years ago

Thanks for adding this feature! I've looked over the changes and also the code in root.go, and read the comments here and on https://github.com/dropbox/dbxcli/issues/104

I'm still a little confused though. Is it possible to continue to use the default app keys (i.e. not create my own dropbox app) and then use either the web authentication response or the data from the ~/.config/dbxcli/auth.json file set as an environmental variable instead of using the config file?

I've tried it with both DROPBOX_PERSONAL_APP_KEY and DROPBOX_PERSONAL_APP_SECRET but this doesn't seem like the right place for it...