feathersjs-ecosystem / authentication-client

[MOVED] The authentication client
https://github.com/feathersjs/feathers
MIT License
41 stars 19 forks source link

app.on('logout', cb) is called after user refresh the browser #137

Closed achilsowa closed 5 years ago

achilsowa commented 5 years ago

Hey guys. I think this is more a question than an issue.

I'm using the default feathers authentication configuration (local and jwt) When the client logout, I want to clear its channels. The problem is that the logout event is triggered in at least in two different situations

  1. when the user logout from the client (which is the normal case app.logout in the client)
  2. when the user reload the page (but does not signout, only refresh its browser page)

These are two different cases and should not be handled the same way. The problem is from app.on('logout, cb), I can't see any difference between the 2, when I receive the event

daffl commented 5 years ago

That is correct, separating logout and disconnect is currently not possible but will be in authentication v3.