Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created December 3, 2021 04:29
Show Gist options
  • Select an option

  • Save hieptl/9f2a41aefa12614e8235b3ba1419b30e to your computer and use it in GitHub Desktop.

Select an option

Save hieptl/9f2a41aefa12614e8235b3ba1419b30e to your computer and use it in GitHub Desktop.
signup.js - client - create cometchat account - Zoom Clone
const createCometChatAccount = async ({ id, fullname, avatar }) => {
const authKey = `${process.env.REACT_APP_COMETCHAT_AUTH_KEY}`;
const user = new cometChat.User(id);
user.setName(fullname);
user.setAvatar(avatar);
return await cometChat.createUser(user, authKey);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment