todo-list icon indicating copy to clipboard operation
todo-list copied to clipboard

Todos still visible after logout

Open johnlim opened this issue 8 years ago • 0 comments

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.

johnlim avatar Apr 11 '16 13:04 johnlim