Error after server restart with connected client: BadRequest: Authentication strategy 'jwt' is not registered.
To reproduce
- Authenticate a client, go to the index (/) and see that messages are coming in
- Restart the server
- Wait for a while
What should happen
Nothing. Messages should keep coming in and there should be no errors.
What actually happens
The socket connection is not automatically recreated (see issue #19) and we get an error on the server:
2018-03-12T08:24:11.803Z - error: BadRequest: Authentication strategy 'jwt' is not registered.
at new BadRequest (/Users/aral/ind.ie/products/indienet/meta/spikes/security/publickey-auth-feathers-nuxt-sockets/node_modules/@feathersjs/errors/lib/index.js:86:17)
at Object.<anonymous> (/Users/aral/ind.ie/products/indienet/meta/spikes/security/publickey-auth-feathers-nuxt-sockets/node_modules/@feathersjs/authentication/lib/hooks/authenticate.js:41:29)
at promise.then.hookObject (/Users/aral/ind.ie/products/indienet/meta/spikes/security/publickey-auth-feathers-nuxt-sockets/node_modules/@feathersjs/commons/lib/hooks.js:174:73)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
For discussion of this error in a similar circumstance, see: https://github.com/feathersjs/feathers/issues/667