I am siting in a bit of a predicament and cannot find a information about a solution to the predicament on the internet even though I'm sure that someone would have encountered it.

The problem if offline log out and still receiving notifications.

I have a application where multiple accounts can log into the same device at the same time. When a user logs into the app it is registers with notification hub which we use to push notification to our users even when the user has closed the application.


  • We have multiple users logged into one device.
  • Each user has there own registration with the notification hub.
  • The user logs one of the accounts out while the phone is offline.
  • This in turn fails to unregister the that account from the notification hub
  • The user kills the application
  • The notification hub still believes that the account is still logged in.
  • When the device has internet it gets the notifications that where queued up.

The question is, are there any best practices or an approach to deal with this situation. The notification holds sensitive data, so if an account has been removed for a specific reason, we shouldn't still be sending a notification to that device with information about the logged out account.

  • 2
    This isn't solved by UX but by proper implementation.
    – Tvde1
    Commented Jul 8, 2019 at 13:14
  • You should definitely seek advice from security professionals on this one, not UX enthusiasts! If UX is your thing, then relinquish this problem to your architects and security team as it is, as @Tvde1 put it, an implementation (architecture and security) problem.
    – straya
    Commented Sep 30, 2021 at 0:25

2 Answers 2


There could be a couple of technical solutions, that you should probably validate on Stack Overflow. For example, on iOS 10 and younger there is a way for the notification to "modify it's content" upon receiving before displaying. So, in theory, when the device receives the notification, it could "ask" the app if the user is still logged in and only then display the sensitive information. I am not sure if there's similar functionality on Android.

Another solutions could be more "UX-ey" and process oriented:

  • Rework your notifications. If the content is that sensitive, maybe you should consider reworking the text of your notifications so they don't containing sensitive information. Besides, push notification, if you don't implement some kind of encryption to them, aren't really that secure, so it's generally not the best idea to send sensitive information in notifications;
  • Educate your users. You could let them know about the possibility of receiving the sensitive information even after logging out offline with some guides on how to disable the display of notification content on locked device, etc.

Does your business (or client's business) bring this problem upon itself by requesting/enforcing the sharing of a single device between multiple users?

As you can see, push-notifications services aren't even designed to integrate into such a usage pattern very well. You are using personal devices in an impersonal way, yet expecting that it is safe to send private and sensitive info. Maybe the push-notifications should just send a suggestion to the app to, while authenticated, request the private/sensitive data from a server/cloud instead? = not UX btw, architecture and technical implementation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.