Extending handshake request #460
-
In axum auth middleware, I validate bearer token and add claims as an extension to the request. I can't use headers with socketio as browsers restrict that due to CORS. So, I'm using the auth (which comes in body) during handshake in my socketio client on browser. Challenge I'm facing is that with the socketioxide middleware, I'm able to get the auth body but unable to extend the handshake request. Perhaps there is another way to make the claims available for the duration of my socket session (without relying on external cache). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Added the claims to SocketRef.extensions |
Beta Was this translation helpful? Give feedback.
Added the claims to SocketRef.extensions