Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
strapi-plugin-fcm
Advanced tools
Readme
npm install strapi-plugin-fcm
yarn add strapi-plugin-fcm
cd /<path-to-your-strapi-project>/src
# create plugins folder if not exists
# mkdir plugins
# go to plugins folder
cd plugins
# clone the plugin code into a folder and skip the prefix
git clone https://github.com/itisnajim/strapi-plugin-fcm.git strapi-plugin-fcm
# install dependencies
cd strapi-plugin-fcm && yarn install # or npm install
<root>/config/plugins.js
.module.exports = {
// ...
'strapi-plugin-fcm': {
enabled: true,
resolve: './src/plugins/strapi-plugin-fcm' // path to plugin folder
},
// ...
}
# back to project root and build the plugin
yarn build # or npm run build
# start
yarn develop # or npm run develop
In the same interface 'FCM Plugin Configuration', optionally you can provide where the devices tokens are stored, in the picture example above, I store them in User -> deviceToken (strapi generate the users database table with the name up_users).
Optionally you can provide all the topics you have, in the 'FCM Topic' collection type (via the dashboard or via the api - Post requests).
{
"data": {
"title": "OKey",
"body": "Test body",
"image": "",
"payload": "",
"targetType": "topics",
//or "targetType": "tokens",
"target": "client_android",
//or multiple topics "target": "client_android,client_ios",
//or "target": "eyJhbGciOiJFUzI1...",
//publishedAt: null //<<- uncomment this if you want to just add an entry as a draft to 'FCM Notification' collection without publishing and sending FCM.
}
}
{
"data": [{...entry1}, {...entry2}, {...entry3}, ...]
}
If you have saved the entries in the FCM Notification collection as drafts, you can scheduled them to be sent to FCM at a later time.
FAQs
Send notifications to users or topics using The Google's service: Firebase Cloud Messaging.
The npm package strapi-plugin-fcm receives a total of 66 weekly downloads. As such, strapi-plugin-fcm popularity was classified as not popular.
We found that strapi-plugin-fcm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.