Clear Provider State and User Listeners Before Firebase LogoutClear Provider State and User Listeners Before Firebase Logout
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Firebase signOut does not touch your providers or the listeners on user documents, so cancel those subscriptions before you invalidate provider state, or one that is still open writes the previous user's document back into the state you just cleared.

duskolicanin.com

Clear Flutter User State Safely When Logging Out

Firebase signOut ends the session, nothing more. Close listeners, invalidate providers and clear owned caches so the next account sees none of the last.

Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started