feat(messaging): migrate FCM Web quickstart to FID-based APIs - #1080
feat(messaging): migrate FCM Web quickstart to FID-based APIs#1080hozhng wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Firebase Cloud Messaging (FCM) Quickstart sample to use the latest Firebase SDK (v12.17.1) and transitions the implementation from legacy registration tokens to the new FID-based (Firebase Installation ID) APIs. Key changes include updating the main application and service worker scripts, revising the HTML UI to display the FID, and updating the README with the FCM HTTP v1 API documentation. The review feedback highlights several critical issues: a version mismatch between the service worker and the main application, potential runtime crashes in environments lacking the Notification API, a UI bug where denied permission errors are hidden, and a typo in the HTML charset attribute.
9bfe127 to
f439ad6
Compare
081c23e to
14de063
Compare
- Replace deprecated getToken/deleteToken with register/unregister and onRegistered/onUnregistered callbacks - Update UI elements and terminology from Registration Token to Installation ID (FID) - Upgrade firebase dependency to ^12.17.1 to support FID APIs - Update README documentation and cURL instructions for FCM HTTP v1 API Bug: b/522441204
14de063 to
f7f3feb
Compare
Description
Migrate Firebase Cloud Messaging (FCM) Web quickstart sample app to use the new FID-based SDK APIs.
Key Changes
getToken/deleteTokenwithregister/unregisterandonRegistered/onUnregisteredcallbacks inmessaging/main.ts.firebaseto^12.17.1.README.mdto reflect FID registration flow and FCM HTTP v1 cURL format.Verification
npm run dev).onRegisteredcallback receiving FID, ForegroundonMessagehandler, andunregisterflow.npm run build).