This repository has been archived by the owner on Apr 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added support for external Google API OAuth2 client credentials #428
Open
rohfle
wants to merge
4
commits into
prasmussen:master
Choose a base branch
from
rohfle:feature-clientid-json
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TanukiAI
approved these changes
Jan 31, 2019
since this is not being maintained, i forked this repo, github.com/tripLr your welcome to post there |
@rohfle golang.org/x/oauth2 wants cloud.google.com/go/compute/metadata, can you please update your PR to vendor it too? |
@dmgk I have updated vendor with godep (learning golang as we go) |
@rohfle Thanks! |
uqs
pushed a commit
to freebsd/freebsd-ports
that referenced
this pull request
Feb 23, 2019
- Pull in patches from prasmussen/gdrive#428 enabling support for external Google API OAuth2 client credentials - Add pkg-message with reference to workaround for "Rate Limit Exceeded" errors - Pet portlint while here PR: 235497 Submitted by: Dmitri Goutnik <[email protected]> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@493640 35697150-7ecd-e111-bb59-0022644237b5
uqs
pushed a commit
to freebsd/freebsd-ports
that referenced
this pull request
Feb 23, 2019
- Pull in patches from prasmussen/gdrive#428 enabling support for external Google API OAuth2 client credentials - Add pkg-message with reference to workaround for "Rate Limit Exceeded" errors - Pet portlint while here PR: 235497 Submitted by: Dmitri Goutnik <[email protected]> (maintainer)
Jehops
pushed a commit
to Jehops/freebsd-ports-legacy
that referenced
this pull request
Feb 23, 2019
- Pull in patches from prasmussen/gdrive#428 enabling support for external Google API OAuth2 client credentials - Add pkg-message with reference to workaround for "Rate Limit Exceeded" errors - Pet portlint while here PR: 235497 Submitted by: Dmitri Goutnik <[email protected]> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@493640 35697150-7ecd-e111-bb59-0022644237b5
swills
pushed a commit
to swills/freebsd-ports
that referenced
this pull request
Mar 4, 2019
- Pull in patches from prasmussen/gdrive#428 enabling support for external Google API OAuth2 client credentials - Add pkg-message with reference to workaround for "Rate Limit Exceeded" errors - Pet portlint while here PR: 235497 Submitted by: Dmitri Goutnik <[email protected]> (maintainer) git-svn-id: svn+ssh://svn.freebsd.org/ports/head@493640 35697150-7ecd-e111-bb59-0022644237b5
#476 is preferred as it is much simpler than this PR. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
WHY
By default, gdrive uses OAuth2 client credentials (client id and secret) in
order to allow it to use Google's Drive APIs on behalf of the user. The credentials
are set inside gdrive by default. Unfortunately this means that the rate limit of
API usage is shared amongst all gdrive users globally. It has become common for
the rate limit to be exceeded, causing gdrive to stop stop working.
This pull request makes it possible to load external OAuth2 client credentials. Rate limits are credential specific, so changing to your own generated client credentials avoids the shared rate limit problem.
HOW TO USE
Generate your new credentials in the Google API Console (see steps 3-14 here), name the credentials
file
client_id.json
and move it to the gdrive config directory (default on linux~/.gdrive/
).Then delete
token_v2.json
to reauthenticate using the new credentials.SIDE EFFECTS
You need to delete the old token in order for the new credentials to be used.
Existing sync directories will not work after the credentials change. This is because sync sets appProperties on files and folders it uploads as well as the root sync folder. When the credentials change, the appProperties are no longer visible, and gdrive sees the sync directory as a non-empty folder not set up for sync.