pusher / chatkit-client-js

JavaScript client SDK for Pusher Chatkit
https://pusher.com/chatkit
MIT License
90 stars 15 forks source link

cannot read property default of undefined #101

Closed kingtross88 closed 5 years ago

kingtross88 commented 6 years ago

How do i create a chat kit user in my app. I'd like to take the authentication UID to pusher

const chatkit = new Chatkit.default({ instanceLocator: "instance", key: "myKey" })

  chatkit.createUser({
    id: "23923hs123",
    name: "James Bond"
  })

I'm using the same code from the site.

gianpaj commented 6 years ago

See this https://github.com/pusher/chatkit-client-js/issues/87 - How do you create users?

basicall you need to do it from your backend server, not from the client

gileswells commented 6 years ago

@kingtross88 did you get this working?

mdpye commented 5 years ago

Going to close this one as advice has been offered and it's now stale.