How to handle push notifications in a multi-user application?

Please provide the following:

  1. SDK Version: 34
  2. Platforms(Android/iOS/web/all): All

The current issue I’m running into is that if User A enables push notifications and signs out, and then User B logs into the same device at the same time, User B will start receiving User A’s push notifications.

Is there a way to appropriately approach this issue?