This repository was archived by the owner on Mar 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 116
This repository was archived by the owner on Mar 22, 2022. It is now read-only.
Server crashes when authenticating with Socket.io transport and no user entity service exists #526
Copy link
Copy link
Closed
Description
Steps to reproduce
- Create a FeathersJS app which authenticates as follows:
- Authenticate with feathers-authentication-jwt
- Do NOT provide a users service, and leave
authentication.serviceandauthentication.pathblank in the config file - Pass feathers-authentication-jwt a custom verifier that does not rely on any users service
- Create a FeathersJS client which authenticates as follows:
- Authenticate with feathers-authentication-client
- Use the feathers-socketio client transport
- Attempt to authenticate from the browser client with the
jwtstrategy
Expected behavior
A connection should be established and authenticated
Actual behavior
The server crashes with the following error:
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::find' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::get' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::create' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::update' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::patch' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/storage::remove' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/authentication::create' +1ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/authentication::remove' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/config::find' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::find' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::get' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::create' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::update' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::patch' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/events::remove' +0ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/availability::find' +1ms
feathers-socket-commons:methods Setting up socket listener for event '58e2a3047463f61e5de6dbd6/api/availability::create' +0ms
/Users/jhill/Development/livescheduler/node_modules/feathers-authentication/lib/socket/handler.js:193
entityService.on('updated', _updateEntity2.default);
^
TypeError: Cannot read property 'on' of undefined
at Namespace.<anonymous> (/Users/jhill/Development/livescheduler/node_modules/feathers-authentication/lib/socket/handler.js:193:20)
at emitOne (events.js:101:20)
at Namespace.emit (events.js:191:7)
at Namespace.emit (/Users/jhill/Development/livescheduler/node_modules/socket.io/lib/namespace.js:212:10)
at /Users/jhill/Development/livescheduler/node_modules/socket.io/lib/namespace.js:180:14
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
System configuration
Module versions:
- feathers v2.1.3
- feathers-authentication v1.2.4
- feathers-authentication-client v0.3.2
- feathers-authentication-hooks v0.1.4
- feathers-authentication-jwt v0.3.1
- feathers-hooks v2.0.1
- feathers-socketio v2.0.0
- socket.io-client v2.0.3
NodeJS version: v7.9.0
Operating System: Mac OS X
Browser Version: Chrome v58.0.3029.110 (64-bit)
Module Loader: Webpack v2.2.1
Metadata
Metadata
Assignees
Labels
No labels