Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
firebase-fcm-v1-http2
Advanced tools
A Node.js library for sending push notifications using Firebase Cloud Messaging HTTP v1 APIs.
This Node.js library provides a simple interface for sending push notifications using Firebase Cloud Messaging HTTP v1 APIs. It replaces deprecated FCM APIs with the latest HTTP v1 methods, ensuring compatibility and future-proofing for sending notifications.
Send multicast notifications using HTTP/2 multiplexing through the FCM HTTP v1 API.
Install the package via npm:
npm install firebase-fcm-v1-http2
Supported features:
- [X] HTTP/2 session & stream concurrency
- [X] Token batching support
- [X] Uninstall detection
- [X] Retry mechanism
Then, start using the package by importing and instantiating it:
const { Client } = require('firebase-fcm-v1-http2');
// Initialize Firebase Client
const firebaseClient = new Client({
serviceAccount: require('./path/to/serviceAccountKey.json'),
// Add optional configurations here
});
// Send a notification to multiple devices
const message = {
notification: {
title: "Test Notification",
body: "This is a test message"
},
data: {}
};
const tokens = ['device_token_1', 'device_token_2'];
firebaseClient.sendMulticast(message, tokens)
.then(unregisteredTokens => {
console.log('Unregistered tokens:', unregisteredTokens);
})
.catch(error => {
console.error('Error sending notification:', error);
});
Apache 2.0
FAQs
A Node.js library for sending push notifications using Firebase Cloud Messaging HTTP v1 APIs.
We found that firebase-fcm-v1-http2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.