This is your boilerplate project for developing React apps inside Google Sheets, Docs, Forms and Slides projects. It's perfect for personal projects and for publishing complex add-ons in the Google Workspace Marketplace.
MIT License
1.32k
stars
171
forks
source link
Creative ideas to enhance performance? EG getting Access Token into React App #202
Hello, I am writing an add-on for Google Docs and I noticed my getAccessToken() server-side function takes too long and could impact UX moving between states. Right now, my app is structured in the following flow:
Storing the Access Token in PropertiesService.getUserProperties()
Closing the Modal and opening a Sidebar (main app)
Making another Google App Scripts Server Call to retrieve the Access Token from the Properties Service.
I'm trying to find a happy medium to minimize the amount of slow-running Google App Script calls to make sense like using fetch on the React App where needed.
Hello, I am writing an add-on for Google Docs and I noticed my getAccessToken() server-side function takes too long and could impact UX moving between states. Right now, my app is structured in the following flow:
Modal which redirects to our Login Page using Auth Code Flow with PKCE (using https://github.com/googleworkspace/apps-script-oauth2)
Storing the Access Token in PropertiesService.getUserProperties()
Closing the Modal and opening a Sidebar (main app)
Making another Google App Scripts Server Call to retrieve the Access Token from the Properties Service.
I'm trying to find a happy medium to minimize the amount of slow-running Google App Script calls to make sense like using fetch on the React App where needed.