Open tzachbaksis opened 1 year ago
It looks like you are setting the cache and property store correctly:
.setCache(CacheService.getUserCache())
.setPropertyStore(PropertiesService.getUserProperties())
There may be a small delay between when cache writes are reflected in cache reads, but it should be short enough to not matter. Does waiting a minute before opening the new window change anything?
What code are you using to determine if the user needs to authenticate again? Could it be that there is an error in that logic?
I have encountered an issue with the OAuth2 library in Google Apps Script, specifically related to the persistence of the authentication session across different tabs or browser instances. When using the provided authentication flow with Auth0, I noticed that after logging in through my Gmail add-on, the authentication session does not persist when opening a new tab or browser instance.
Expected Behavior:
When logging in to app without the add-on, the authentication session remains active, and opening a new tab or browser instance does not require reauthentication. The same behavior is expected when logging in through the Gmail add-on, where the authentication session should persist across tabs or browser instances.
Observed Behavior:
After logging in through the Gmail add-on, opening a new tab or browser instance prompts me to authenticate again when accessing mywebsite.com. This behavior is inconsistent with the expected behavior observed when logging in without the add-on.
Code sample:
Thanks in advance