Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge
This PR uses a random id in local storage for the root id when the appMode is dev. This restores a similar behavior to how appMode dev worked before the switch to use session storage for the firebase credentials.
To enable this:
However:
This approach breaks the Firebase functions which create and read data in the Realtime database and Firestore. These functions compute the root based on a context and the firebase auth that is passed to them. Previously the dev root was firebase auth uid, so that is what these functions are using. To support the new dev root approach, we'll need to send the random id from local storage to the functions. This complicates things because it is used by almost all the functions. We haven't migrated the old functions to the new functions-v2 folder, so it is harder to work on them.
The functions that would be broken in appMode dev are:
All of these functions should not crash with this PR, they just are looking in or updating the wrong root in Firebase. So they save documents in the wrong place, or return no documents because the runtime is writing to a different place than the functions are looking.