You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in a situation where I ask for a fcmToken getToken (from firebase/messaging).
I store that token in a table, linked to the current user. The user uses my website on multiple machines, so I store multiple tokens in that table.
And later on, I can receive notifications.
After a few days, I ask again for the token via getToken.
I check if that token is present in the stored array of tokens.
If the token is there I show in the UI that the device can receive notifications.
Now, the frustrating thing is that after a few days, my mobile phone will produce a new fcmToken value.
This leads me to believe that the previous token value for the mobile device is no longer valid.
And the mobile device is no longer receiving any notifications.
How can I know the token is about to expire, refresh the token and store it in my table?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi folks,
I'm in a situation where I ask for a fcmToken
getToken
(fromfirebase/messaging
).I store that token in a table, linked to the current user. The user uses my website on multiple machines, so I store multiple tokens in that table.
And later on, I can receive notifications.
After a few days, I ask again for the token via
getToken
.I check if that token is present in the stored array of tokens.
If the token is there I show in the UI that the device can receive notifications.
Now, the frustrating thing is that after a few days, my mobile phone will produce a new fcmToken value.
This leads me to believe that the previous token value for the mobile device is no longer valid.
And the mobile device is no longer receiving any notifications.
How can I know the token is about to expire, refresh the token and store it in my table?
Beta Was this translation helpful? Give feedback.
All reactions