[Session] Restore emailAuthFactor and emailConfirmed from last session #3939
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.
Carries over https://github.com/bluesky-social/social-app/pull/3728/files#diff-ba67025ff0027278031f772f88a9ed2f7fa4b12421d0a423ad74b4937aa2ca53R281 from #3728.
My bad that I missed it.
This fixes the false positive "you have not verified your email" popup. The
emailConfirmed
flag is not required so I forgot to specify it. So when you resume session from storage, the first render will not have the full object.The full object still arrives a bit later (and gets written to the persistent storage) but then the same problem happens on next refresh. (The reason people don't see the same problem on next refreshes now is due to the auto-snoozing flag for this popup.)
Test Plan
Comment out all the other checks in
shouldRequestEmailConfirmation
. Verify that the full object comes through when you refresh the page, and the popup does not appear.