cometchat-uid-1
, cometchat-uid-2
, cometchat-uid-3
, cometchat-uid-4
and cometchat-uid-5
.login()
method.
We recommend you call the CometChat login method once your user logs into your app. The login method needs to be called only once but the getLoggedInUser() needs to be checked every-time when the app starts and if it returns null then you need to call the login method.
Parameter | Description |
---|---|
UID | The UID of the user that you would like to login |
authKey | CometChat Auth Key |
login()
method returns the User
object containing all the information of the logged-in user.
login()
method.Parameter | Description |
---|---|
authToken | Auth Token of the user you would like to login |
login()
method returns the User
object containing all the information of the logged-in user.
logout()
method to log out the user from CometChat.