hapijs / nes

WebSocket adapter plugin for hapi routes
Other
502 stars 87 forks source link

Get auth result on connect #290

Closed Brunomachadob closed 4 years ago

Brunomachadob commented 5 years ago

It seems like it's not possible to get the user/auth information from the connect method.

I believe this would be a nice feature to have.

Today I have to call connect to authenticate (I can see in my server logs that I'm replying the auth information) and then call request to get some more user details.

It would be nice to have access to the auth information the server is responding, this way I won't waste another round trip to the server.

I'm open to working on it if you guys agree.

hueniverse commented 4 years ago

What do you mean "replying the auth information"? The auth info is only sent to the client in cookie or token modes and it is encrypted. There is no generic auth information to share with the client, nor would that make sense in most cases. You just have to send another request, the way most authentication flows work.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.