Logging Out

User can be logged out by disconnecting the user. After disconnection, call connect user for logging in with another user.

// Disconnect from web-socket events, but keep the offline state
chatClient.disconnect {
  // …
}
// or
await chatClient.disconnect()

// Disconnect from web-socket events and delete the offline state
chatClient.logout {
  // …
}
// or
await chatClient.logout()

Disable Push Notifications

Additionally, you’ll want to stop the user from receiving further push notifications by unregistering their device.

© Getstream.io, Inc. All Rights Reserved.