我正在通过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 Key?我在哪里可以找到这个密钥?”
flutter_messaging
,好的。 - Amir Farahani