You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Authentication options only seem to support building an OAuth flow from scratch.
Describe the solution you'd like
It would be nice to be able to re-use "internal" OAuth tokens which google creates on the client side for Apps Script projects which use the card builder UI.
When building test-only (single user) and internal-domain applications and using the card builder UI, Google generates auth flow for you based on the Apps Script project defined scopes. When including OAuth and OpenID in the scopes there in this way, a token is generated for "internal" Google API usage, and the developer of the project can access and send it via authorization headers to an external API even, but it has no refresh options, so it isn't compatible with the current implementation of gspread by the looks of the docs/code.
In my case I'm sending API calls to an external Flask API for NLP cleanup purposes, and then having the Flask API send POST data back to the spreadsheet. Using gspread would be nicer than using the Google Client SDK directly, but a glance at the auth code suggests that I would have to create my own auth flow for this, whereas with the Google Client SDK I could just pass an authorization header into my Flask API with Google's internal token in it and away I go.
Describe alternatives you've considered
Building my own OAuth flow of course, but the Apps Script UI builder is nice, it takes a lot of boilerplate out of building apps script projects from a UI standpoint, I just have to define buttons, not build a whole UI with HTML, CSS, etc, and not build an OAuth flow.
Additional context
Perhaps an internal auth flag (internal_token=True/False with the default to False) could be used to bypass a lot of the external or service account auth flow? Will take a look.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Authentication options only seem to support building an OAuth flow from scratch.
Describe the solution you'd like
It would be nice to be able to re-use "internal" OAuth tokens which google creates on the client side for Apps Script projects which use the card builder UI.
When building test-only (single user) and internal-domain applications and using the card builder UI, Google generates auth flow for you based on the Apps Script project defined scopes. When including OAuth and OpenID in the scopes there in this way, a token is generated for "internal" Google API usage, and the developer of the project can access and send it via authorization headers to an external API even, but it has no refresh options, so it isn't compatible with the current implementation of gspread by the looks of the docs/code.
In my case I'm sending API calls to an external Flask API for NLP cleanup purposes, and then having the Flask API send POST data back to the spreadsheet. Using gspread would be nicer than using the Google Client SDK directly, but a glance at the auth code suggests that I would have to create my own auth flow for this, whereas with the Google Client SDK I could just pass an authorization header into my Flask API with Google's internal token in it and away I go.
Describe alternatives you've considered
Building my own OAuth flow of course, but the Apps Script UI builder is nice, it takes a lot of boilerplate out of building apps script projects from a UI standpoint, I just have to define buttons, not build a whole UI with HTML, CSS, etc, and not build an OAuth flow.
Additional context
Perhaps an internal auth flag (
internal_token=True/False
with the default to False) could be used to bypass a lot of the external or service account auth flow? Will take a look.The text was updated successfully, but these errors were encountered: