Created
October 27, 2021 07:04
-
-
Save hieptl/31a9d05fd6128718f6049123148ac40d to your computer and use it in GitHub Desktop.
signup.js - Register New CometChat Account - Encrypted Chat App
This file contains hidden or 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 authKey = `${process.env.REACT_APP_COMETCHAT_AUTH_KEY}`; | |
const user = new cometChat.User(userUuid); | |
user.setName(fullname); | |
user.setAvatar(userAvatar); | |
cometChat.createUser(user, authKey).then( | |
user => { | |
setIsLoading(false); | |
},error => { | |
setIsLoading(false); | |
} | |
) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment