-
Notifications
You must be signed in to change notification settings - Fork 456
Closed
Description
Some Gmail add-ons developers have reported that concurrent executions can lead to race conditions. When paging through emails quickly, you can load two instances of the add-on at the same time. If the access token is expired, both instances will attempt to refresh the token, resulting in two new tokens. Some OAuth providers invalidate old access and refresh tokens when new ones are granted, leading to cases where invalid tokens are persisted.
The workaround has been to using the LockService to prevent concurrent access to portions of code that could lead to a token refresh. These can be scattered throughout the codebase however, so ideally we'd have support for locking in the library itself.
oshliaer
Metadata
Metadata
Assignees
Labels
No labels