lahsivjar / react-stomp

React websocket component for STOMP protocol over SockJs
https://www.npmjs.com/package/react-stomp
MIT License
134 stars 41 forks source link

Adding onConnectFailure callback #130

Closed GabrielBB closed 4 years ago

GabrielBB commented 5 years ago

I'm using this component for an online game. I introduced web socket security using JSON Web Token to my Spring Boot server, if the token is invalid then my server denies the web socket connection. My problem is that I can't handle this failure in the client because you are just logging the error, I need a callback so my clients are sent to a login page and a new token is created.

I hope you can merge and publish this as fast as possible :/ I also made the changes needed in the README.md

Thanks

lahsivjar commented 5 years ago

@GabrielBB Thank you for the changes. I will publish within today

GabrielBB commented 5 years ago

@GabrielBB Thank you for the changes. I will publish within today

Nice! Thanks!

lahsivjar commented 4 years ago

Deployed as version 4.2.0 https://www.npmjs.com/package/react-stomp