-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: App still receives notifications for the previous external ID if I call OneSignal.logout() and OneSignal.login() for other external ID #1730
Comments
I am seeing the same issue. Is there a workaround for this? |
@jennantilla any update from this issue still getting previous employee notification after oneginal.logout() |
I am also facing the same issue. I would love a solution asap! |
Hi @reinevan thank you for the logs. I see the issue is that the first
You marked this as affecting both Android and iOS, can you confirm you also experienced this behavior on iOS? |
What happened?
I have a React Native Expo application where I use react-native-onesignal v 5.2.0 to receive push notifications. In the app users can log in / log out:
OneSignal.login(externalId)
OneSignal.User.addEmail(emailAddress)
OneSignal.User.addTag('email', emailAddress)
OneSignal.User.addTag('phone', phoneNumber)
When the user logs out, I invoke:
OneSignal.logout()
When some updates happen on the backend, I send push notifications to related users using "include_external_user_ids" field in the REST API call.
The scenario is as follows:
User A logs in, the app receives push notifications sent to User A.
User A logs out.
User B logs in.
As the result the app does NOT receive push notifications for User B, but still receives notifications for User A.
Steps to reproduce?
What did you expect to happen?
I expected app to stop receiving push notifications for external ID if I invoked OneSignal.logout() and want to receive push notifications for external ID if I invoked OneSignal.login(externalId).
React Native OneSignal SDK version
Release 5.2.0
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: