Code Monkey home page Code Monkey logo

nuxt-fcm's Introduction

StandWithPalestine

Ceasefire Now

nuxt-fcm's People

Contributors

becem-gharbi avatar dependabot[bot] avatar itscark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

misswhale

nuxt-fcm's Issues

TypeError: Cannot read properties of undefined (reading 'messaging')

I am using :
@bg-dev/nuxt-fcm": "^0.2.5"
"nuxt": "^3.5.1",

And keep on getting the error in the title:

If I inspect further it seems that my $fcm is not registration, I have followed the steps as per docs, not sure what I am missing and hope someone can assist:

import { useNuxtApp } from "/_nuxt/node_modules/nuxt/dist/app/index.js?v=beecf9d0";
import { getToken as _getToken } from "/_nuxt/node_modules/firebase/messaging/dist/esm/index.esm.js?v=beecf9d0";
import { onMessage as _onMessage } from "/_nuxt/node_modules/firebase/messaging/dist/esm/index.esm.js?v=beecf9d0";
export default function() {
const { $fcm } = useNuxtApp();
async function getToken() {
return _getToken($fcm.messaging).catch(() => "");
}
function onMessage(cb) {
_onMessage($fcm.messaging, cb);
}
return { getToken, onMessage };
}

Is there any solution for exposed firebase data in client/browser ?

Hi... I have a problem that when we add this module, our firebase data is exposed in client / browser source code. As I know that nuxt 3 expose the runtime config public data in the client side without separating the file or encrypt or anything that makes the data more secure. Which is the fcm data in this module I think has been moved to the runtimeConfig public when nuxt app running.
Can you give me an advice for that ?

Thanks.

Can't subscribe to topic

Hello Cant subscribe to topic {
"url": "/api/fcm/topic/subscribe",
"statusCode": 401,
"statusMessage": "",
"message": "unauthorized",
"stack": "

<span class="stack internal">at handleError (D:\V2\node_modules\@bg-dev\nuxt-fcm\dist\runtime\server\utils\error.mjs:7:19)\n<span class="stack internal">at Object.handler (D:\V2\node_modules\@bg-dev\nuxt-fcm\dist\runtime\server\api\fcm\topic\subscribe.post.mjs:18:5)\n<span class="stack internal">at Object.handler (/D:/V2/node_modules/h3/dist/index.mjs:2196:34)\n<span class="stack internal">at /D:/V2/node_modules/h3/dist/index.mjs:1962:31\n<span class="stack internal">at async Object.callAsync (/D:/V2/node_modules/unctx/dist/index.mjs:72:16)\n<span class="stack internal">at async Server.toNodeHandle (/D:/V2/node_modules/h3/dist/index.mjs:2249:7)
"
}

500 Service messaging isn't available

Hi! I've got this strange issue, related with my firebaseConfig:

defineNuxtConfig: {
....
ssr: true,
fcm: {
firebaseConfig: {
apiKey: "XXXXXXXXXXX"",
authDomain: "XXXXXXXXXXX"",
databaseURL: "XXXXXXXXXXX"",
projectId: "XXXXXXXXXXX"",
storageBucket: "XXXXXXXXXXX"",
messagingSenderId: "XXXXXXXXXXX",
appId: "XXXXXXXXXXX",
measurementId: "XXXXXXXXXXX"",
},
vapidKey: "XXXXXXXXXXX",
},
.....
}
But I ain't got this issue week before,

image

Unable to send Message

Hi, thanks for the great repo..

I am having difficulty sending a message.

I get the following

send

This is working of the playground example

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.