Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

336
Visualizações
How would I verify an users identity SOCKET.IO

I am making an live - chat platform, but I cannot find a way to verify a users identity.

I do not have any code because there arent any errors.

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

You need a way to uniquely identify the socket to each client, so you'd have to do something like this:

Login request to API > API retrieves user from database > Sends Response to Client > Create websocket connection in frontend, pass in unique id from database response through url params to wss endpoint > you can also do db transactions with this unique identifier to add more fine grained control for caching/session tracking.

It's hard to really give specific code examples if you're not sharing your code.

about 4 years ago · Juan Pablo Isaza Relatório

0

I ended up solving this after reading this article. They used the express-session package and showed how to get the req.session variable from a socket.io event.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda