MatthieuLemoine / electron-push-receiver

A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
194 stars 69 forks source link

Shutting down and restarting push receiver #30

Open DrifterAtSea opened 6 years ago

DrifterAtSea commented 6 years ago

In my app I have a sign-in screen. When the app starts, the push-receiver gets started and after the user signs in is able to receive push notifications. When the user signs out, the app is still running and the user is presented with the sign-in screen. However the push receiver was already registered and still receives notifications. I want to avoid that. I don't want to receive any push notifications when the user is not signed in. There are a few solutions I can see:

Any suggestions on this? Thanks!