Fixed a bug that locks you out of Quickbase #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When uploading many code page files to Quickbase, sometimes Quickbase would flag suspicious behaviour and block access to your account for 10 minutes.
The reason seems to be...
The package worked by logging the user in implicitly, as part of the upload code page request.
The first few files would upload successfully, however, after a certain number of files are uploaded, Quickbase would flag this as 'suspicious' and lock you out of Quickbase.
Once you get locked out, the rest of the code pages had to be uploaded manually.
This made the library a lot less useful for us.
We also saw some forum posts from other users who had the same issue.
In general this is a really helpful library for us, and we wanted to keep using it. So we decided to fix this issue.
Changes we made...
Previously the package logged the user in implicitly, as part of the upload code page request.
Now, the the user is logged in with an explicit call to the authenticate endpoint.
The ticket returned by Quickbase is cached so it can be reused to upload multiple files.
This avoids authenticating to Quickbase many times, so we no longer get locked out.
In addition:
The library now supports authentication with a user_token as well.
user_token can be specified in config, and also as an env variable.
We've also enabled specifying username and app_token as env variables; previously only password could be an env variable.