Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/libs/actions/OnyxUpdateManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ function handleMissingOnyxUpdates<TKey extends OnyxKey>(onyxUpdatesFromServer: O
// we don't have base state of the app (reports, policies, etc.) setup. If we apply this update,
// we'll only have them overwritten by the openApp response. So let's skip it and return.
if (isLoadingApp) {
// If one of these onyx updates is for the authToken, update it now because our current authToken is probably invalid.
updateAuthTokenIfNecessary(onyxUpdatesFromServer);
Comment thread
VickyStash marked this conversation as resolved.

// Nothing reads this key again once we return, but it is persisted, so a restart would replay it and
// could write a now-stale authToken over a newer session. Drop the consumed copy.
Onyx.set(ONYXKEYS.ONYX_UPDATES_FROM_SERVER, null);

// When ONYX_UPDATES_FROM_SERVER is set, we pause the queue. Let's unpause
// it so the app is not stuck forever without processing requests.
unpauseSequentialQueue();
Expand Down
Loading