client.signOut()
To stop receiving messages for a particular user and to cut off the connection with the server, be sure to sign out of the JS SDK.
While the platform does a good job of cleaning up open resources, it is always good housekeeping to sign out when the client does not want to show incoming messages.
See also client.signOutAllDevices() to sign the current user out of all of their devices.
Definition
client.signOut():Promise<void,Error>
Returns
An error will be thrown if the operation is unsuccessful, otherwise null
will be returned.
Examples
await client.signOut();console.log('Signed out successfully');