Skip to content
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

[Question]: turn off notifications on certain device if logout #135

Open
captain-avocado opened this issue Jan 8, 2024 · 1 comment
Open

Comments

@captain-avocado
Copy link

How can we help?

I have several apps connected to one OneSignal account: Android, iOS and Web.
If the user logout, for example, from web app, I want him to continue receiving notifications on Android and iOS (if he's still logged in there). But at the same time user don't need notifications from Web app. How can I achive this? Should I just use logOut method?

@jkasten2
Copy link
Member

jkasten2 commented Jan 22, 2024

@captain-avocado I would recommend using OneSignal.logout() as you noted. Logout removes the push subscription from User that was logged in.

If you also want the browser to stop receiving all OneSignal notifications, then you will also need to disable them with OneSignal.User.PushSubscription.optOut().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants