Closed arden closed 7 years ago
Hi, could you provide details/logs ? I have just checked examples, everything is OK.
@mogol i'm use server as: let url = "ws://localhost:8000/connection/websocket" Optional(Error Domain=com.Centrifuge.error.domain.websocket Code=3000 "{"reason":"invalid token","reconnect":false}" UserInfo={NSLocalizedDescription={"reason":"invalid token","reconnect":false}})
@arden please also show us how you generate your token and which credentials do you use: user
, timestamp
and info
.
i'm deploy a centrifuge server on my localhost, and change the client connect url is: let url = "ws://localhost:8000/connection/websocket" some error is invalid token.
but use let url = "wss://centrifugo.herokuapp.com/connection/websocket" work fine.
i'm only modify the client connect url, that connect my localhost centrifuge server.
@arden I suppose that ws://localhost:8000/connection/websocket
and wss://centrifugo.herokuapp.com/connection/websocket
use different secret keys. wss://centrifugo.herokuapp.com/connection/websocket
uses secret
as secret key. Looks like in your local instance you have another secret key set in config (or maybe you have not set it in config.json
at all)
@FZambia thanks, work fine now.
@FZambia @mogol now,i'm develop a game APP, there are two way: socket.io or centrifuge。Which of them is better.
@arden sorry, it's only up to you to decide which solution is better for your case 😏
When i'm run this examples. the server side have some errors is: invalid token for user ios-swift