OneSignal / react-onesignal

React OneSignal Module: Make it easy to integrate OneSignal with your React App!
Other
74 stars 23 forks source link

[Question]: How do get current subscription session external_id/active tags or any other information attached to subscription? #134

Open Virtouzo opened 5 months ago

Virtouzo commented 5 months ago

How can we help?

How do get current subscription session external_id/active tags or any other information attached to subscription?

I have went through the source code and the documentation back and forth. The only mention of external id I see in the source code, is when logging in.

What I am trying to achieve, is that if I detect, that currently logged in user external_id doesn't match the one attached to subscription, I would initiate a logout and re-login.

Is that achievable?

captain-avocado commented 5 months ago

I can confirm this problem. I can't get user tags, although this method should exist according to docs.

@Virtouzo I don't understand your issue for sure, but as possible option, I can assume, that you can rely on other external state of your app which stores externalID. If your externalID is id of the user fetched from server, just watch for its changing and perform logout/login with onesignal SDK.