muraliwebworld / push-notification-plugin-for-wordpress-websites

Push Notification WordPress plugin in php, javascript using Firebase httpv1 for websites, Android/IOS mobile apps with PWA progressive web app
https://wordpress.org/plugins/push-notification-for-post-and-buddypress/
GNU General Public License v3.0
13 stars 1 forks source link

Server key #14

Open cvrle77 opened 1 month ago

cvrle77 commented 1 month ago

I cannot send notifications, unless I have 'server key' field populated, however, that field is from Cloud messaging Legacy API, while I am using http v1 API (or at least I want to use it)

image

That was a short version. Longer version: I've seen issues by having same details in test and production website. So, I've opened new firebase project following your instructions. At the moment, Google is having issues with creating server key, while the rest of the details can be created. So I did that, and not entering server key details, because I don't have them.

Also, on Cloud Messaging tab, in Firebase, it says that I have to migrate from it by 6/20/2024, which means this key will be deprecated. If we want to use only httpv1, do we only need to upload service account json file? Why do we need server key that will be deprecated? image

There is no error message at any stage to suggest that I am doing something wrong. There is no notification history, so I can see that sending failed, or creation of it failed, or message that I am missing server key.

muraliwebworld commented 1 month ago

In upcoming release i will make server key as optional, At present, old logic which checks for server key is empty or false (for legacy notification) is present and httpv1 notification logic is also added after that condition, due to this problem occurred, I will remove this condition in upcoming release. Until i release next version, if you want to use httpv1 version, just fill some characters in server key field, it will not use this field for httpv1 notification. httpv1 notification will work even if server key is invalid. I will update the logic in correct way to ignore this condition in upcoming release. It will take few more days on or before Monday i will release next version soon. Since i am working on PWA enhancement and also i am thinking to incorporate PWA app to native mobile app conversion to generate apk file directly in this plugin, that research is taking more time for me now. Until i release next release, please fill some characters in server key and use httpv1 notification.

cvrle77 commented 1 month ago

Oh, I didn't even try, because I didn't know it's possible :)