I´m working with websockets in adonisjs, and everything works fine when I don't implement jwt authentification, but when I include it, the connection fails

this.connected = ws.withJwtToken(localStorage.getItem('token')).connect()

        this.connected.on('open', () => {
            this.wsChannel = ws.subscribe('dyno:audits')

            this.wsChannel.on('error', console.log)
        })

the line of code of 'error' shows me in the console that "Cannot find module 'Adonis/Middleware/Session"

I don't know if the configuration of the file changes because the type of auth, anyone knows something about it?

0 Answers