Comments (7)
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.
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.
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.
Marshall mentioned that feather-authenticate v1 now has auth.on('create', ...)
and auth.on('remove', ...)
?
from feathers-chat.
@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.
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.
Could someone please paste the code needed to hack into socket.io for listing all user connections?
from feathers-chat.
Related Issues (20)
- oauth github sign in HOT 4
- How would the front end connect to a remote backend? HOT 2
- Example 'app.publish is not a function' HOT 1
- Cannot get github auth working HOT 4
- Upgrading Helmet to the next major version
- Page is blank because scripts are blocked by browser security HOT 8
- Initial click on "Sign up and log in" fails with No record found for id '1' HOT 1
- app.listen(...).on is not a function HOT 1
- Test configuration not working HOT 1
- clear install ReferenceError: feathers is not defined HOT 1
- Cannot find module 'feathers-chat' or its corresponding type declarations. HOT 5
- [FR] first class module support HOT 1
- [fr] make app.ts export an asynchronous function HOT 4
- oauth github fails with `error: BadRequest: validation failed` HOT 5
- Workflows breaks Cloud IDE's HOT 1
- [perf] Database migration takes 40 seconds with an empty database HOT 1
- [FR] More DX improvements
- [FR] Support ESM out of the box
- Feathers Chat MySQl/MariaDB version
- Sample Chat Not Working for MongoDB HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feathers-chat.