todo-list
todo-list copied to clipboard
Todos still visible after logout
Hi,
When a user logs out, the list of todos are still visible on screen even after a browser refresh. Modifying todo-data.html as follows
// Setup user ref in firebase if auth succeeds
_userChanged: function(user) {
if (user) {
this.userLocation = [this.location, 'users', this.user.uid].join('/');
return
}
this.todos = [];
}
clears the todos. However, I'm not sure if there is a better approach. For example, should firebase-collection>
automatically zero out/clear data when disconnected? Also, I'm not sure if there's any impact to the offline storage capability via iron-localstorage with this approach.