Closed juangvega closed 4 months ago
Thanks for bringing it up. I'll check out the upgrade posibility. In mean time, feel free to add whatever you find. Thanks :)
I found this. It is an upgraded version of MatthieuLemoine/push-receiver with the new endpoints.
Thanks for the detective work. I'll attempt to transplant the changes within a few days and see if it works. Help is always appreciated :)
It's looking good. Got a working version. There are some new requests and token refreshing that needs to be done before I release the changes. Also there are some data changes so old tokens are probably gonna need to be re-generated
@juangvega I've created a new version. Can you please double check form that is's working as expected? https://www.npmjs.com/package/@eneris/push-receiver/v/4.0.1-beta
Hi there! This is great news. I will try later and let you know. Thanks
Seems to be working well
@Eneris Thanks for your work on updating the FCM API. I'm preparing to update ring-client-api which heavily depends on push-receiver, however, it's not clear to me what the upgrade/migration process from older versions might be. Do I need to generate an FCM project for my specific project?
I'll try to look through the source code to get a better clue, but just doesn't feel very clear to me right now what firebase
property should contain so if you have any hints it would be appreciated.
@Eneris Thanks for your work on updating the FCM API. I'm preparing to update ring-client-api which heavily depends on push-receiver, however, it's not clear to me what the upgrade/migration process from older versions might be. Do I need to generate an FCM project for my specific project?
I'll try to look through the source code to get a better clue, but just doesn't feel very clear to me right now what
firebase
property should contain so if you have any hints it would be appreciated.
Hi. Yea. The firebase project is required now (the free tier will do fine). Just copy-paste the config that firebase gives you for the web apps. https://github.com/Eneris/push-receiver/blob/master/src/types.ts#L119-L128 These parts of the config are required
{
projectId: string
appId: string
apiKey: string
messagingSenderId: string
}
As for migration steps:
https://firebase.google.com/docs/web/setup
Follow the Step 1.
here and firebaseConfig
from Step 2.
is what you need here
Web credentials for firebase are public so don't worry about compiling them into the code
These endpoints will stop working next month: const FCM_SUBSCRIBE = 'https://fcm.googleapis.com/fcm/connect/subscribe' const FCM_ENDPOINT = 'https://fcm.googleapis.com/fcm/send'
https://firebase.google.com/support/faq#fcm-23-deprecation https://firebase.google.com/docs/cloud-messaging/migrate-v1