Closed mehrdad-shokri closed 4 months ago
Would you mind opening a PR? I'd be glad to review it.
Thank you!
Sure, will do in the following days
@mehrdad-shokri @Pacane
I think this solves your problem. This feature was added in this PR: https://github.com/braverhealth/phoenix-socket-dart/pull/71
return PhoenixSocket(
"ws://localhost:4000/socket",
webSocketChannelFactory: (uri) {
return IOWebSocketChannel.connect(uri, headers: { "token": "My Token"});
},
);
@matehat - I think this issue is resolved.
Here you are calling
connect
on WebSocketChannel https://github.com/braverhealth/phoenix-socket-dart/blob/70a437c11617505d280988f6204cb4b34ce66cc2/lib/src/socket.dart#L193Please provide a
Map<String, String> headers
on the constructor of PhoenixSocket so we can pass our authentication cookies to the server.