account-sdk-browser
account-sdk-browser copied to clipboard
Detect changes in login status based on cookies
Currently the hasSession call caches all results using a common key (hasSession-cache) in browser session storage.
If the session state reflected in cookies changes it might not be detected until the cache expires.
To detect such changes in cookie state the hasSession result cache key could depend on the session cookie value, for example:
- key:
hasSession-cachefor not logged-in user - key:
hasSession-cache-<cookie value>for logged-in user