I have a use case where I need to have FCM messages sent only if the user is logged in to my website. There is an issue where if Google delays the sending of the message and a different user logs into the same machine, then they may be shown the notification meant for the first user. Is there any support to attach custom authentication by Google when the message is actually received by Chrome.
Related
How can I get the device type or operating system from an FCM registration token on my app server, or can I make a post request to my app server with the registration token and user_id?
Reason is, I want to programmatically be able to send messages only to certain usersegments like I can in the firebase console.
Information about the device cannot be extracted from the FCM instance ID token.
You will have to set up your own stream of the information from the client to your servers, where you can then combine it with the FCM token to target users. Not incidentally, this is what Firebase itself does too (through Google Analytics) and is what powers the targeting in the Firebase console.
I haven't seen any examples of this, but I want to purely interact with Firebase through the backend, and not the frontend with Javascript.
I have auth tokens being minted on my Go backend when a new user is added and then these users are written into a mongo database.
What I want is to be able to get a messaging token for my users, and then add it to their user document in mongo, that'll be used to send messages through the backend.
The reasoning is that we don't want to have to communicate with Firebase on our frontend.
Is this even possible?
If you want to send a message directly to a device with Firebase Cloud Messaging, you will definitely need some information from the client. There is no avoiding following the setup instructions on the client. In particular, you will have to handle the registration token on the client and send it to your backend so it can send the messages.
The Firebase Authentication token will not be useful to you at all for sending messages. FCM doesn't send messages to users - it sends messages to devices (or topics). You will have to figure out for yourself which devices belong to which users.
i'm thinking about using Firebase for the notification service that my app needs. However, its important that the process of sending notifications is secure. I want to avoid a notification being sent from any member of the team without permission.
One way could be assigning restricted roles and permissions for the team members. However it also would be good to have any kind of activity log in the console, or have a log of all notifications sent including the name of the user. The console currently allows you to see all notifications sent, but i cannot see who sent it, and also the notification can be deleted from the log.
Any ideas on how to manage this? Which specific roles would you recommend me to use? Is it possible with Firebase?
You could write a function in Firebase which sends notifications, and you have logs on that function. Here is how to write a function which send notifications
We tried to use the StackDriver Error Reporting notification features, but it seems that for any Project, when we turn on the notification, it always sent to the email associated with the developer account that we logged in. How can we change it to a different email account. (we use PageDuty, and we want this notification to send to a pagerduty sink email account)
Today, email notifications on new errors for a given project are enabled per user and can only be delivered to the email associated with his user's account.
As a workaround, and if possible, you could setup an email filter that would forward these emails.
I am the Stackdriver Error Reporting product manager.
It is not the first time we hear this feedback and we are working on improving the situation.
I'm having trouble figuring out whether or not FCM keeps logs of sent FCM push notifications, and if so, how to access them. I'm having intermittent issues with sending push notifications from an FCM server to an iphone app, and would love to be able to see at what stage the push is failing.
I found the below documentation that suggests that these logs should be kept somewhere:
https://support.google.com/googleplay/android-developer/answer/2663268?hl=en
("You can look up messages sent through Firebase Cloud Messaging with a registration token or message ID.")
However, I can't seem to figure out how to access them. Since my app is currently iOS only, I don't have an app in the Google Play Developer console, and my firebase console doesn't seem to contain any such logs. However, based on the possible message statuses in the documentation above (e.g. Accepted, sent to APNS), it seems like google / firebase should store message logs sent to iOS as well as to Android.
Thanks in advance for your help!