Created
January 9, 2022 10:46
-
-
Save hieptlccc/92e6ea65939186667e2f65190ba0553c to your computer and use it in GitHub Desktop.
signup.js - create cometchat account - webex clone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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