Conversation
phumpal
force-pushed
the
SCA-1248
branch
2 times, most recently
from
September 15, 2026 04:54
aa9ca56 to
3b5837a
Compare
phumpal
marked this pull request as ready for review
September 15, 2026 04:57
The cache only remints when credentials are missing or firebase.apiKey changes. INVALIDATE_REGISTRATION is ipcMain.handle so the caller can await the drop before START_NOTIFICATION_SERVICE. Bump to 2.1.10.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
The native FCM registration cache is refreshed only when credentials are missing or
firebase.apiKeychanges. If a stored token is later rejected with FCMSENDER_ID_MISMATCHthe client otherwise reuses it indefinitely. Reload and secondSTART_NOTIFICATION_SERVICEreceive the same cached token.This adds
INVALIDATE_REGISTRATIONviaipcMain.handle. The renderer can await clearing the cached registration state (credentials,fcmApiKeyandstarted) and destroying the MCS client. The nextSTART_NOTIFICATION_SERVICEthen callsregister()and mints a fresh token.Why
ipcMain.handle?This must be request/response rather than fire-and-forget. The caller invalidates the registration and immediately starts the notification service. With
ipcMain.on/send, the start can race ahead of invalidation, hit thestarted === trueearly return and re-upload the rejected token.Bumps package version to
2.1.10.