//first call to initialize app
if (!firebase.apps.length) {
firebase.initializeApp(config)
}
When the user logs out, I need them to disconnect to the realtime database.
firebase.app().delete().then( () => {
if (!firebase.apps.length)
{
firebase.initializeApp(config)
}
this.goToSignin();
})
However, when I try to sign in again I get an error saying the default app is already deleted
FirebaseError: Firebase: Firebase App named '[DEFAULT]' already deleted (app/app-deleted).