firebase-module
firebase-module copied to clipboard
What is the best way for clear persistence data ?
Hi,
I want clear all firestore data (persisted) on disconnection :
this.$fireModule
.firestore()
.clearPersistence()
.catch((error) => {
console.error(
'Thank you to delete app data manually",
error.code
)
})
But I have error because app is initialized: FirebaseError: Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.
What is the best way for clear all firestore data ?
Hey @tibs245
Currently this will be hard to do, but we could probably implement this as an option similarly to how we do it for enablePersistence: https://firebase.nuxtjs.org/service-options/firestore#enablepersistence
Won't have time the next few weeks, feel free to create a PR for it if you need the feature :)
br, Pascal