Git Product home page Git Product logo

Comments (7)

daffl avatar daffl commented on September 13, 2024 2

It has app.on('login') and app.on('logout') (which emits some additional information like the connection and request/response object if available).

from feathers-chat.

daffl avatar daffl commented on September 13, 2024 2

The best (and not so hacky) way to get all connections is to combine all event channels and list those connections:

app.channel(app.channels).connections.forEach(connection => {});

from feathers-chat.

 avatar commented on September 13, 2024

Is there a way, when they authenticate, to get the socket id on which it has happened ? This way, we could have an array of socket id on which the user is currently connected (and if the array is empty, then the user isn't connected anywhere).

from feathers-chat.

eddyystop avatar eddyystop commented on September 13, 2024

Marshall mentioned that feather-authenticate v1 now has auth.on('create', ...) and auth.on('remove', ...)?

from feathers-chat.

subodhpareek18 avatar subodhpareek18 commented on September 13, 2024

@daffl app.on('logout') seems to not be generating for rest provider. app.on('login') seems to be generating for both socket io and rest

from feathers-chat.

daffl avatar daffl commented on September 13, 2024

For REST the user has to explicitly call app.logout() since there is no other way to tell. In Socket.io the logout event will also be sent on socket disconnection.

from feathers-chat.

boustanihani avatar boustanihani commented on September 13, 2024

Could someone please paste the code needed to hack into socket.io for listing all user connections?

from feathers-chat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.