dropbox / dbxcli

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

Where/how does dbxcli store account information? #130

Open stupkad opened 4 years ago

stupkad commented 4 years ago

Hi there,

first - thanks for this great piece of software.

Could anyone explain how dbxcli is linked to dropbox, and where/how the account information is stored?

Regards, Dietmar

mgrandi commented 4 years ago

you login via oauth, it gives you a link for you to paste in your browser, you click accept, and it gives you a token to paste back into dbxcli and then it saves the authentication information

According to this method: https://github.com/dropbox/dbxcli/blob/master/cmd/root.go#L154

it stores the authentication configuration at <HOMEDIR>/.config/dbxcli/auth.json

mwolf1989 commented 4 years ago

A question according this: Is the authentication for ever or is there a timeout and I have to renew it after x- days?

mgrandi commented 4 years ago

as far as i can tell, dropbox doesn't support getting a token for a certain period of time, so it should last until the token is revoked either through the API or through https://www.dropbox.com/account/connected_apps

mwolf1989 commented 4 years ago

@mgrandi this is totally fine for me. I want to use it in a more or less headless context. Thanks!