This repository was archived by the owner on Nov 11, 2024. It is now read-only.
v2.0.0
Features
-
usage of auth option to send credentials (a14d4e9)
See: https://socket.io/docs/v3/middlewares/#Sending-credentials
BREAKING CHANGES
extraHeaderswithAuthorizationdoesn't work anymore
Migration
You need to change the way to connect client side.
Before :
import { io } from 'socket.io-client'
const socket = io('http://localhost:9000', {
extraHeaders: { Authorization: `Bearer ${yourJWT}` }
})After :
import { io } from 'socket.io-client'
const socket = io('http://localhost:9000', {
auth: { token: `Bearer ${yourJWT}` }
})