Closed JamesDullaghan closed 6 years ago
You need to create the user from your server. See: https://docs.pusher.com/chatkit/reference/server-node#creating-a-user https://docs.pusher.com/chatkit/quick_start/javascript#create-a-user
For example: https://github.com/pusher/chatkit-server-node/blob/master/examples/create_user.js https://github.com/pusher/chatkit-server-node (from this repo)
Also, make sure you read these articles to understand the architecture of how Chatkit works: https://docs.pusher.com/chatkit/core-concepts https://docs.pusher.com/chatkit/authentication
Thank you very much for the help! Closing now.
Using the node package, I'm not sure how to create a user. The documentation states to use
Chatkit.default
I try to import Chatkit using:
But this doesn't work.
I try to call createUser on ChatManager, but this doesn't work either. This is in a react-native app and debugging is a bit more difficult for me here.
This is more of a question of if there is a correct way to create a user? If so, what is it? The example seems to be supplying a currentUser without creating one first.
In the source, when we call connect, it looks like it creates an instance of CurrentUser
https://github.com/pusher/chatkit-client-js/blob/master/src/chat-manager.js#L64
So why is the response I'm getting
Thanks for your time, and I'm guessing this is a documentation thing being as it's just a beta. Any response will be appreciated!