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
// ...</code></pre><p>Apps Script has <ahref="https://developers.google.com/apps-script/reference/properties/properties-service">property stores</a> scoped to the user, script,
199
+
or document. In most cases you'll want to choose user-scoped properties, as it
200
+
is most common to have each user of your script authorize access to their own
201
+
account. However there are uses cases where you'd want to authorize access to
202
+
a shared resource and then have all users of the script (or on the same
203
+
document) share that access.</p>
204
+
<p>When using a service account or 2-legged OAuth flow, where users aren't prompted
205
+
for authorization, storing tokens is still beneficial as there can be rate
206
+
limits on generating new tokens. However there are edge cases where you need to
207
+
generate lots of different tokens in a short amount of time, and persisting
208
+
those tokens to properties can exceed your <code>PropertiesService</code> quota. In those
209
+
cases you can omit any form of token storage and just retrieve new ones as
210
+
needed.</p>
211
+
<h3>Caching</h3><p>Scripts that use the library heavily should enable caching on the service, so as
193
212
to not exhaust their <code>PropertiesService</code> quotas. To enable caching, simply add
194
213
a <code>CacheService</code> cache when configuring the service:</p>
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "apps-script-oauth2",
3
-
"version": "1.35.0",
3
+
"version": "1.36.0",
4
4
"description": "OAuth2 for Apps Script is a library for Google Apps Script that provides the ability to create and authorize OAuth2 tokens as well as refresh them when they expire.",
0 commit comments