Skip to content

Cloud Messaging Device Token Expiry? #6351

Answered by mikehardy
JeremyBradshaw7 asked this question in Q&A
Discussion options

You must be logged in to vote

I think the real idea here is "what are best practices for token management", because expiry isn't the important part. You must store tokens on the server for them to be useful for device targeting so you always have to manage token freshness/staleness.

https://search.brave.com/search?q=firebase+device+token+expiration+time

https://stackoverflow.com/questions/41982619/when-does-a-fcm-token-expire

https://firebase.google.com/docs/cloud-messaging/android/client#sample-register

Here's the token management guide:

https://firebase.google.com/docs/cloud-messaging/manage-tokens

And here's how you can listen for async token changes while the app is running, in combo with fetching the token on sta…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JeremyBradshaw7
Comment options

Answer selected by mikehardy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants