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?
Asked
Active
Viewed 524 times
1 Answers
2
When logging out, you can try to call OneSignal.removeExternalUser()
method. And logging in, OneSignal.setExternalUserId(userId)
.

Tarik
- 537
- 4
- 9