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). |
Answered by
A-D-I-T-Y-A
Feb 27, 2025
Replies: 1 comment
Added the claims to SocketRef.extensions |
0 replies
Answer selected byA-D-I-T-Y-A
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Added the claims to SocketRef.extensions