canjs / can-connect-feathers

The FeathersJS client library for DoneJS and can-connect
https://canjs.com/doc/can-connect-feathers.html
MIT License
10 stars 4 forks source link

Fix logout #40

Closed marshallswain closed 7 years ago

marshallswain commented 7 years ago

can-connect-feathers should probably do something more like this for destroyData:

destroyData: function (session) {
  return feathersClient.logout().then(function(){
    Session.trigger('destroyed', [session]);
    this.destroyInstance(session);
  }.bind(this));
}

Then the "session destroyed" event will fire and clear the session data from the UI.

marshallswain commented 7 years ago

Related to https://github.com/donejs/bitcentive/issues/175

marshallswain commented 7 years ago

This is fixed in the currently-published 3.0.0-pre.22.