Closed cyberprophet closed 1 month ago
If you want to use [Authorize], you can use IOWebSocketChannel instead of WebSocketChannel to pass Header.
_webSocket = IOWebSocketChannel.connect(Uri.parse(url), headers: { 'Authorization': 'Bearer ${_accessTokenFactory != null ? await _accessTokenFactory!() : ''}' });
It is also possible to transmit the entire header by slightly modifying the code in part lib/web_socket_transport.dart.
If you want to use [Authorize], you can use IOWebSocketChannel instead of WebSocketChannel to pass Header.
It is also possible to transmit the entire header by slightly modifying the code in part lib/web_socket_transport.dart.