Reputation: 83
I am confused about how to handle notifications in the react-native app if the user is not logged in. I send push notifications via OneSignal to the application but if a user is not logged in I should not send a notification, how can I check user is logged in or not?
Upvotes: 2
Views: 1080
Reputation: 597
When logging out, you can try to call OneSignal.removeExternalUser()
method. And logging in, OneSignal.setExternalUserId(userId)
.
Upvotes: 2