[IMS] Reduce logout / org switch awareness
- Dominant language
- JavaScript
- Stars
- 34
- Forks
- 71
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 29
Description
With https://github.com/adobe/da-live/pull/941 we hardened how we detect tokens. This is currently too aggressive and negatively impacts medium to long running tasks in other tabs.
## Criteria of acceptance
1. If an ESM memoized token in the current tab is still valid, we should still respect it and not force the tab to no op.
## Additional context
1. Worth looking at the websocket / yjs flow to ensure we are not going *right back* to `window.adobeIMS.getAccessToken()` and can use the memoized token *if it is still valid*. We only want to go to `window.adobeIMS...` if the token we currently have is not valid.
2. If we're not able to get this data easily, it may be worth storing a secondary value so we can get to this data easily.
Contributor guide
Research direction
Trace the websocket/Yjs flow around window.adobeIMS.getAccessToken() and the ESM memoized token handling. Verify when the current-tab token is still valid, then exercise logout and organization-switch scenarios; done means valid memoized tokens continue the task without forcing the tab to no-op, while invalid tokens still trigger fresh token lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100