Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: apply sync node listeners only after auth handler has been attached #1716

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

nsrCodes
Copy link
Contributor

Firebase sdk handles all steps synchronously.
Hence, since the sync node listeners get applied before the authHandler callback is applied (effectively a race condition), the rdb interractions inside the authHandler take slightly longer time.

This time increases with increase in the size of the rule payload being fetched from the DB.

These changes add a global state about if the authHandler has been applied. Sync node listeners are attached only after they have been applied.

Although this state is redundant to the already present initializations.auth state, but wanted to keep this separate.

Copy link

typo-app bot commented Jun 5, 2024

Typo Code Review 📊

✅ All checks passed!

@requestly requestly deleted a comment from deepsource-io bot Jun 5, 2024
@nsrCodes nsrCodes merged commit b51c33c into master Jun 6, 2024
2 checks passed
@wrongsahil wrongsahil deleted the ENGG-1736 branch June 6, 2024 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants