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
If the user is logged in, but their access token in local storage has expired, it's possible for the logged-in UI state in the "outer" editor-standalone app to be different from that in the web component.
Steps to reproduce
Clear all browser state / use private browser session
See that both the global nav UI and the web component "Save" button is in the logged-in state
Expire/invalidate the access token in local storage by running a script in the browser console (see below)
Refresh the project page
See that the global nav UI is in the logged-out state, but the web component "Save" button is in the logged-in state (i.e. the button text does not say "Log in to save")
The bodge works around the problem that if an API request is made (e.g. triggered by useProject) before the user has been set in the redux state (by localStorageUserMiddleware), it's possible that the initial API request fails because it has an out-of-date access token and the API request is not retried even once the user has been set in the redux state.
The text was updated successfully, but these errors were encountered:
I think this is caused by silent renewal not working in editor-standalone (fix here). I believe the web-component is doing its own silent renewal too (see the boolean in userManager) - potentially the cause of some of the CORP issues and it won't update because the object in localstorage isn't updating (due to the silent renewal issue) so the user object in the web-component isn't updating either
Key bits:
If the user is logged in, but their access token in local storage has expired, it's possible for the logged-in UI state in the "outer" editor-standalone app to be different from that in the web component.
Steps to reproduce
Before access token expires
After access token expires
Notes
useProject
) before the user has been set in the redux state (bylocalStorageUserMiddleware
), it's possible that the initial API request fails because it has an out-of-date access token and the API request is not retried even once the user has been set in the redux state.The text was updated successfully, but these errors were encountered: