Essential guide to WebSocket authentication
Authenticating WebSocket connections from the browser is a lot trickier than it should be. Cookie authentication isn’t suitable for every app, and the WebSocket browser API makes it impossible to set an Authorization header with a token. It’s actually all a bit of a mess! That is the last thing you want to hear when it comes to security, so I’ve done the research to present this tidy list of methods to send credentials from the browser.