You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I keep receiving inapps 1) after OneSignal.logout() 2) after login with another id (another user)
Steps to reproduce?
- OneSignal 5.4.2
- Do login:
OneSignal.User.addEmail(profile.email)
OneSignal.login(profile.id)
- Send an inapp via test subscriptions - it's shown - ok
- Do logout:
OneSignal.User.removeEmail(previousEmail)
OneSignal.logout()
- Send an inapp via test subscriptions - it's shown - bug
- Do login with another user (email and id)
- Send an inapp via test subscriptions for the previous user - it's shown - bug
What did you expect to happen?
Device should not receive inapps 1) after logout 2) after login with another user
@Andrew0000
Thanks for the detailed steps and version info!
After OneSignal.logout() is called, the device becomes an anonymous user again (i.e., not associated with the previous external ID). In that state, the SDK will still receive any in-app messages that target anonymous users or broad audiences that include them.
To help narrow this down, could you share:
What audience / filter segment is configured for these in-app messages?
Are they targeting “All Users”, a general segment, or something that doesn’t explicitly require an external ID or email?
For the in-app you send “via test subscriptions”, is it targeting the previous external ID/email only, or also eligible for anonymous users / the device in general?
If the IAM’s audience includes anonymous users (or doesn’t strictly require the previous user identity), then seeing it after logout() and after logging in as a different user would be expected behavior. Once we know exactly how the in-app audience is configured, we can confirm whether this is a bug or just a targeting adjustment that’s needed.
Hi @Andrew0000, the test subscriptions are for testing and debugging purposes. Since it is "Add as Test Subscription", the push subscription itself is the target, so if you logout and login, you are still going to target the same device.
Let me know if you have any further issues and I'll take another look.
Activity
jinliu9508 commentedon Jan 13, 2026
@Andrew0000
Thanks for the detailed steps and version info!
After OneSignal.logout() is called, the device becomes an anonymous user again (i.e., not associated with the previous external ID). In that state, the SDK will still receive any in-app messages that target anonymous users or broad audiences that include them.
To help narrow this down, could you share:
If the IAM’s audience includes anonymous users (or doesn’t strictly require the previous user identity), then seeing it after logout() and after logging in as a different user would be expected behavior. Once we know exactly how the in-app audience is configured, we can confirm whether this is a bug or just a targeting adjustment that’s needed.
Andrew0000 commentedon Jan 14, 2026
@jinliu9508
It's not audience, I'm targeting a specific user (email).
I'm adding a user to test subscriptions here (it was "Add as Test Subscription"):
Send via that button:
Then I select the test subscription and send via "Send Test Push":
And I keep receiving InApps after 1) logout 2) login with another user/email
nan-li commentedon Apr 10, 2026
Hi @Andrew0000, the test subscriptions are for testing and debugging purposes. Since it is "Add as Test Subscription", the push subscription itself is the target, so if you logout and login, you are still going to target the same device.
Let me know if you have any further issues and I'll take another look.