authenticate socket.io connection #5156
Unanswered
developer-diganta
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently building a chat-app that has a separate auth server that uses keycloak and passport for user validation and authorisation. After the login is complete, I get a session id. After this I am trying to establish a socket connection with the backend server (separate from auth). But I am unable to do so. Here are the problems:
Also, I cannot do direct socket connection, since I am using socket only to send messsages from backend to frontend, the other request is done using api (i.e. from frontend to backend).
I checked this discussion : How to get authenticated user details in socket.io with passport.js ? Why user is undefined in socket.request.user ? #4470 but this did not solve the issue.
Beta Was this translation helpful? Give feedback.
All reactions