Sockjs Connection getting 401 error , info endpoint
Author: MTsrfAjexCreated Apr 26, 2023Updated Apr 4, 2024
Hi
I am using [email protected] with [email protected] in react application.
const socket = new SockJS(url); const stompClient = Stomp.over(socket); const httpHeaders = { 'Authorization': 'Bearer ' + authToken, }; stompClient.connect(httpHeaders, () => { //Success handler }, err => //error handler)
When i refresh the component , it's getting 401 unauthorized error in info endpoint I tried sevaral ways to pass token , but it's gettting same error , pls help me
Source: sockjs/sockjs-client