We’re using Novu to send push notifications via APNS and FCM, with the following requirements:
Support users logged in on multiple devices, ensuring notifications are sent to all active devices. Prevent accumulation of stale/expired device tokens to maintain efficient delivery and accurate reporting.
For the first requirement, we can upsert device tokens to a user’s deviceTokens array on sign-in and remove specific tokens on sign-out. However, for the second requirement, we’re struggling to identify and remove stale tokens (e.g., tokens expired due to app uninstalls or inactivity). From my understanding, Novu doesn’t automatically detect or remove stale tokens, and I couldn’t find a clear solution in this related thread:
Could you clarify: Does Novu provide a way to detect or validate stale APNS/FCM tokens (e.g., via error responses or a validation API)? Are there best practices for proactively removing stale tokens to avoid delivery failures? If Novu doesn’t handle this automatically, are there plans to add such functionality?