Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: SocketIOClient- Swift : Unable to authenticate socket server

Prasanna:

I am passing Authentication token parameter like below...


socket = SocketIOClient(socketURL: URL(string:"http://localhost:3001")!, config: [.log(true), .forcePolling(true),.connectParams(["token": kToken])])

But it always gives an error....


LOG SocketParser: Decoded packet as: SocketPacket {type: 2; data: [login_ack, {
message = "Authentication error.Token not found";
result = "";
status = error;
}]; id: -1; placeholders: -1; nsp: /}

As I think that I am missing some thing to establish authenticated Socket connection. So, please guide me where I am lacking.



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: SocketIOClient- Swift : Unable to authenticate socket server

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×