Laixer / Swabbr-Backend

API backend for the Swabbr application.
2 stars 0 forks source link

Unwanted Notification Registration state #60

Open tabeckers opened 4 years ago

tabeckers commented 4 years ago

When a user logs in the device is immediately registered in Azure Notifications Hub. This action is, however, not completely transactional at the moment. In theory (and thus in practise as well) it's possible for a user to be registered in ANH without having the corresponding registration listed in the database.

At the moment, this will always throw an exception, since our DeviceRegistrationService will not allow untracked registrations in ANH. What to do?

tabeckers commented 4 years ago

The same can happen during logout. At the moment we throw an exception for any undefined state (with explanation ofc). This might be good for a review, since it might obstruct the login and logout process.

tabeckers commented 4 years ago

On registration, the user is not yet registered to ANH. This is done at login.

At logout, this is still relevant, even though we determined not to do anything with the issue right now.