Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockjs Connection getting 401 error , info endpoint #625

Open
MTsrfAjex opened this issue Apr 26, 2023 · 1 comment
Open

Sockjs Connection getting 401 error , info endpoint #625

MTsrfAjex opened this issue Apr 26, 2023 · 1 comment

Comments

@MTsrfAjex
Copy link

Hi

I am using sockjs-client@1.6.1 with stompjs@2.3.3 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

@Bhagwanta1997
Copy link

Could you please share your backend code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants