Logging Out

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

await client.disconnectUser();
await client.connectUser(
  {
    id: 'jack',
    name: 'Jack Doe',
  },
  '{{ chat_user_token }}',
);

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.