Back to All

Firebase cloud messaging support

Hello,

We have a web app developed using nextjs 14. I have built a mobile version of my site https://dudullu.com using your service. Most of the functions are working properly. However, the firebase cloud messaging based dm and notification services are not working. Our system gets an fcm token after successful login using the codes given below.

Is it possible to solve this problem with your service for both android and ios?

Regards,


import {getToken, onMessage} from "firebase/messaging";
import {getMessagingInstance} from "@/lib/config/firebase-config";
...
const token = await getToken(getMessagingInstance(), {
vapidKey: 'BPI0EAK...',
});
console.log("Token generated just before permission request - firebase: ", token);
setFcmToken(token);
...
await saveFCMToken({"fcmToken": fcmToken});

....
//get incoming message into store
onMessage(getMessagingInstance(), (payload) => {
console.log("incoming msg:" + JSON.stringify(payload));
...