Automatically delete stale tokens

Created on 25 May 2024, 11 months ago
Updated 8 June 2024, 10 months ago

Problem/Motivation

According to the Firebase docs:

Stale registration tokens are tokens associated with inactive devices that have not connected to FCM for over a month. As time passes, it becomes less and less likely for the device to ever connect to FCM again. Message sends and topic fanouts for these stale tokens are unlikely to ever be delivered.

There are several reasons why a token can become stale. For example, the device the token is associated with may be lost, destroyed, or put into storage and forgotten.

When stale tokens reach 270 days of inactivity, FCM will consider them expired tokens. Once a token expires, FCM marks it as invalid and rejects sends to it. However, FCM issues a new token for the app instance in the rare case that the device connects again and the app is opened.

This module should provide an option to automatically delete tokens that are older than n days (90 by default?), and then delete them during cron.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024