Skip to content

Allow google drive upload by preventing continuous 401 auth failure due to invalid token string interpolation#1943

Open
lavneetpuri wants to merge 1 commit into
gildas-lormeau:masterfrom
lavneetpuri:patch-1
Open

Allow google drive upload by preventing continuous 401 auth failure due to invalid token string interpolation#1943
lavneetpuri wants to merge 1 commit into
gildas-lormeau:masterfrom
lavneetpuri:patch-1

Conversation

@lavneetpuri

Copy link
Copy Markdown

MediaUploader constructor assigns this.token = options.token; but options.token is an object of form { "grantedScopes": [ "..." ], "token": "..." }. This proposed change instantiates the token property correctly.

Note: This is a stopgap fix that works on the local copy. Feel free to suggest changes as appropriate, taking into account the larger project structure and architecture.

prevent continuous 401 failure during google drive upload due to invalid string interpolation of token object of form `{ "grantedScopes": [ "..." ], "token": "..." }`

@codeCraft-Ritik codeCraft-Ritik left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Correctly extracting the actual token value from the options object should prevent subtle authentication issues.
Appreciate the note about this being a stopgap fix and the openness to architectural improvements 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants