1
coookie
8y

Um hey guys, so I was working with websockets in node.js and wanted to have some form of authentication. Did a bit of googling, read some docs and finally implemented something. It's just I am not sure if it is the right way. Can the experts give their 2 cents?

This is not a rant exactly, so if it comes under self promotion or irrelevant, please tell. 😃

http://iostreamer.me/ws/node.js/...

Comments
  • 1
    Wouldn't JWT/OAuth work in this case too?
  • 1
    If you've implemented what's there in the linked article, it looks right to me. 👍
  • 0
    @karthikiyengar I don't know. Can you tell how it would work?
  • 0
    @coookie Did you figure it out yet? Generate and return a JWT token from the server upon validating credentials. You could send in the JWT token along with the headers of your web socket request and have your server validate it. The article seems pretty decent.
  • 0
    @karthikiyengar Yea! And it's working fine 😃
  • 0
    Btw that is my article. Which is why I was afraid it would be flagged as self promotion 😶
Add Comment