Skip to content

A simple node web chat application which uses JWT for authentication

Notifications You must be signed in to change notification settings

harshitdkanodia/socketio-auth-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

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

Steps :

  1. Install node modules

    npm install
  2. change the secret in the config.js ( or not .. up to you !)

  3. Start server

    node server.js
  4. go to localhost:3000/users/create on web page

  5. go to localhost:3000/ and login with one of these users :

    username: [email protected] password: secret

    username : [email protected] password : secret

  6. Chat ON!

About

A simple node web chat application which uses JWT for authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published