A MEAN app that demonstrates Socket.io JWT authentication . I couldn't find an example of how to configure jwt based auth for socket.io , so i experimented and made this app.
Hope it's helpful!
DISCLAIMER : This is a very basic app that was made for the sole purpose of demonstrating how jwt-auth can be implemented with socket.io
-
Install node modules
npm install
-
change the secret in the config.js ( or not .. up to you !)
-
Start server
node server.js
-
go to localhost:3000/users/create on web page
-
go to localhost:3000/ and login with one of these users :
username: [email protected] password: secret
username : [email protected] password : secret
-
Chat ON!