I would like to use JWT authentication as the client authentication method in Action Cable.
The WebSocket RFC 6455 explicitly states that authentication methods other than cookies can be used. However, in Action Cable’s client interface createConsumer, only the URL can be passed, and there is no way to include an Authorization header to perform the HTTP handshake.
It would be helpful if Action Cable could support passing custom headers (such as Authorization: Bearer <token>) during the initial WebSocket connection, allowing JWT-based authentication to be implemented without relying on cookies.