Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

v2.0.0

Choose a tag to compare

@theoludwig theoludwig released this 22 Feb 12:11
· 249 commits to master since this release

Features

BREAKING CHANGES

  • extraHeaders with Authorization doesn'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}` }
})