Skip to content

This repository presents a way to handle adonis authentcation within socket-io server middlewares

Notifications You must be signed in to change notification settings

prastoin/adonis-socket-io-authentication

Repository files navigation

Adonis & Socket-io authentication example

This repo illustrates the following article. It contains a working and tested socket-io + adonis authentication implementation. For both Web Auth and API tokens Adonis authentication modes.

You can find web auth verification code here start/socket.ts

Related tests here test/WebAuthSocketAuthentication.spec.ts

You can find API token verification code here start/socket.ts

Related tests here test/ApiTokensSocketAuthentication.spec.ts

Setup

Install deps

Install dependencies with yarn by running

yarn

Database

Before running any commands you will need to launch the database by running:

docker-compose up -d

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
yarn test Run tests
yarn dev Starts local dev server at localhost:3333

About

This repository presents a way to handle adonis authentcation within socket-io server middlewares

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published