2

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?

jhintstone
  • 83
  • 5

1 Answers1

2

When logging out, you can try to call OneSignal.removeExternalUser() method. And logging in, OneSignal.setExternalUserId(userId).

Tarik
  • 537
  • 4
  • 9