【发布时间】:2019-07-26 12:44:18
【问题描述】:
我正在通过 Firebase 为 Web 应用实施推送通知,并遵循 Google 的此指南
https://github.com/firebase/quickstart-js/tree/master/messaging
在index.html我看到了这段代码
// [START get_messaging_object]
// Retrieve Firebase Messaging object.
const messaging = firebase.messaging();
// [END get_messaging_object]
// [START set_public_vapid_key]
// Add the public key generated from the console here.
messaging.usePublicVapidKey('<YOUR_PUBLIC_VAPID_KEY_HERE>');
// [END set_public_vapid_key]
我的问题是“什么是 Vapid 密钥?我在哪里可以找到这个密钥?”
【问题讨论】:
标签: firebase firebase-cloud-messaging