Closed dragos-rosca closed 1 year ago
Hi @dragos-rosca , thank you again for your issue. Unfortunally, Service worker does not catch websocket data. The only way is to use the library without service worker and to send them from javascript side.
Hello,
Thank you for the quick response. I'll do that.
Hello,
I don't get an authorization header in my WebSocket requests.
"@axa-fr/react-oidc": "^6.14.1"
I have a react frontend with Apollo client as my main communication with the GQL backend. When I run queries or mutations (this are HTTP POST calls) I see the
authorization
header injected in the request, but when I have a subscription (this is a WebSocket GET call) there is nothing.I have added the WebSocket URL to the
OidcTrustedDomains.js
file (because this is aws://localhost:4001
URL) and still nothing.In the past I used to inject the header by hand in the Apollo client configuration, but this is JS code, no react involved. I was using
getUserManager
to access the token, but this is not the way now withreact-oidc
.Kind regards, Dragos Rosca