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
191 stars 62 forks source link

Shutting down and restarting push receiver #30

Open JohannRosenberg opened 5 years ago

JohannRosenberg commented 5 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!