Dropbox library in LC 9 - centralise the access token?

Trevor DeVore lists at mangomultimedia.com
Wed Oct 11 14:36:04 EDT 2017


On Wed, Oct 11, 2017 at 1:02 PM Ben Rubinstein via use-livecode <
use-livecode at lists.runrev.com> wrote:

>
> In principle I think that a new app, e.g. built in LiveCode, could
> perfectly
> happy operate on a number of accounts simultaneously. But my proposal in no
> way prevents that - the code that makes a series of calls to the Dropbox
> API
> would precede them with a single call to set the relevant token, rather
> than
> passing that token in every call.


Personally I don’t care for lower level functional APIs that have you set
something like an auth  token once and then all calls use the token. To
write safe code built on top of the Dropbox library you would have to set
the API token at the beginning of any handler you write that includes a
call to the Dropbox library. Otherwise if you use some other library in
your app built on top of the Dropbox library it could set the token to the
wrong one behind your back. That seems brittle to me.

My 2 cents.

Trevor DeVore
ScreenSteps

>



More information about the Use-livecode mailing list