-
Notifications
You must be signed in to change notification settings - Fork 120
JWT is not sent after socket reconnection #272
Comments
At the moment have to store the token and send the |
I'm also running into this issue. I've even done the following:
Which I thought was going to be a clever hack. The client-side hook picks it up successfully. But for some reason it's not available in the hook on the server side. Using app.authenticate isn't going to work for me because i'm using the Any ideas? |
@tkornblit I have solved this issue with following code: const socket = io('http://localhost:3030/');
const app = feathers()
.configure(hooks())
.configure(socketio(socket))
.configure(authentication({ storage: window.localStorage }));
socket.on('reconnect', () => {app.authenticate();}); Hope this helps. |
Thanks mate. This was helpful.Tom Kornblit
|
Closing this in favor of feathersjs-ecosystem/authentication-client#2 |
I have stumbled upon strange behavior - after socket is disconnected and connected again, new realtime events does not contain JWT (hook.params.token) which renders all reconnect process useless (= you have to authorize user again manually).
What to do about this?
The text was updated successfully, but these errors were encountered: