jwt-socket.io

0.0.5 • Public • Published

jwt-socket.io

This is my first npm package, just to test how to upload npm packages

A small library for authentication with a user, JWT and socket.io

Installation

npm install jwt-socket.io

It is required to have a folder config/ with index.json in the root of the project

{
  "dbUri": "databaseURI",
  "jwtSecret": "secretkey"
}

the package is assuming you are using mongoose with a user table

I will change all of this later to make it dynamic and flexible

Usage

const io = require('socket.io')(server)
const ioAuthCheck = require('io-auth-check')
io.use(ioAuthCheck)

Tests

They are not available now

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    1
    • latest

Version History

Package Sidebar

Install

npm i jwt-socket.io

Weekly Downloads

4

Version

0.0.5

License

MIT

Last publish

Collaborators

  • arn-the-long-beard