Looking for referrals to articles/tutorials since my search did not come out fruitful.
In my website, I use oauth to authenticate users. Now we would like to implement websockets for push notifications.
The problem is, since the user logged in via http, I am not sure how to make sure they are authenticated when using websockets since
req.isAuthenticated()
is not available obvisouly.
Once I am able to authenticate the user, I also don't understand how I can associate the user's ID from the DB with the socket.
Desired scenario:
- User logs in via web http interface.
- Once the user is authenticated, a websocket is opened between the client and the server
- Through the websocket I am able to communicate to the server that the requesting client has [someID] that was retrieved during the log-in process, and that is also availble via req.user._id
What would be some good articles to start with?
Thank you!
via Michael Seltenreich
No comments:
Post a Comment