问题描述
我在php中具有带有自定义用户身份验证的服务器.我正在尝试与Firebase创建聊天,阅读文档后,我仍然感到困惑,我需要为Firebase验证我的用户身份,如果是,我应该使用signInWithCustomToken进行身份验证吗?
I have server in php with custom user authentication. I'm trying to create chat with Firebase, and after reading docs I'm still confused id I need to authenticate my users for Firebase, and if so should I do it with signInWithCustomToken?
欢迎其他有关我应该如何进行的提示.谢谢.
Any other tips on how should I proceed are welcome. Thank you.
推荐答案
无需对用户进行身份验证,即可接收 FCM消息.
There is no need to authenticate users for them to receive FCM messages.
您确实需要传递FCM服务器密钥才能发送消息到设备.您可以在以下Authorization
标头中看到一个示例: https://firebase.google.com/docs/cloud-messaging/send-message
You do need to pass the FCM Server key to send messages to devices however. You can see an example of that in the Authorization
header here: https://firebase.google.com/docs/cloud-messaging/send-message
这篇关于Firebase Cloud Messaging身份验证是否必要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!