Closed carcinocron closed 6 years ago
Socket.io connections do not use the Authorization
header. As shown in the chat guide frontend and documented here you have to call app.authenticate()
with no parameters to register an existing token (usually from localStorage) with the Socket.io connection. The manual socket authorization process is documented here.
I was using app.authenticate
. After too many rabbit holes to remember, I eventually go the error jwt audience invalid
and resolved updating my server side code to:
app.configure(jwt({
aud: 'webapp',
}));
and on the client:
app.configure(auth({storage, aud: 'web'}));
Hm, that is interesting. This might actually be related to https://github.com/feathersjs/authentication-client/issues/95 in that it swallows the proper error message. I'll look into it and hopefully get a fix for it soon. Thanks for the update!
I'm getting a similar issue to https://github.com/feathersjs/authentication/issues/655 except I'm not using auth0.
With the following transit data in socketio
In neither case do I see the accessToken in transit. Removing the hook
authenticate('jwt')
from the service works.I'm thinking it's just not being sent?