FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

[Question] How to handle logout situation.

Open soooraj opened this issue 4 years ago • 2 comments

How we need to handle logout situation in connection with Firebase notification. I am trying for a solution to stop receiving notification once the user is logout from the app. And again I need to enable the notification once the user is login back.

Also what in case if some other user login the same app?

Please help. I think this information is missing in documentation.

soooraj avatar May 22 '20 10:05 soooraj

This is what you need to call after a logout

CrossFirebasePushNotification.Current.UnregisterForPushNotifications();

Lydecker avatar Jun 03 '20 00:06 Lydecker

Hi, depends of your process to register device. If your login process are successful, I guess you are saving that token device associated to that logged user right? If is that your scenario, in logout you should call to api service to disassociate that Token-User.

This situation depends in each case, put this in the documentation I think it's not correct.

Regards!

mimunoz avatar Jun 04 '20 15:06 mimunoz