Closed gaoooon closed 7 months ago
I am unclear about your question. The connectHeaders are not HTTP headers.
Please check https://stomp-js.github.io/faqs/faqs.html#p-can-i-use-token-based-authentication-with-these-libraries-p
If it does not resolve your query, please elaborate.
Since our team is using HTTP Only cookies, direct access to cookies from the client-side is not possible. Consequently, manually including the access token in the connectHeader is necessary. However, obtaining the access token is not feasible due to the HTTP Only cookie restriction. Even when using withCredentials, the connectHeader is not an HTTP header, making it impossible to access the cookie directly.
Is there a way to solve this issue?
Here are the solutions our team is considering:
Adding a new API endpoint on the server that returns the access token in the response body. Modifying the server logic to handle the access token differently. Your feedback would be appreciated.
Closing this as it is not an issue with this library.
Please let me know if there is an example of putting httpOnly cookies in connectHeaders.