0
votes

We have one device group per user for our mobile app. When a new user sign up, a new device group with registration token is created via create operation from app server and its notification key is stored with user data.

When a user sign out of the app, its registration token is removed from the notification key via remove operation as we don't want to send personal notification for that user to that device anymore. This step returns same notification key.

When a user sign in again, we try to add the registration token via add operation using the stored notification key. This action returns 400 (Bad Request) status from Firebase server.

Is this expected behavior? If so, how to handle the above use-case?

1

1 Answers

0
votes

Notification key for a device group is removed as soon as the token count reaches zero.

I ended up using topics instead of device groups for this use case.