Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase messaging showing wrong vapid key with calling getMessaging #1574

Open
JacobStewart20 opened this issue Sep 17, 2024 · 0 comments
Open

Comments

@JacobStewart20
Copy link

JacobStewart20 commented Sep 17, 2024

What problem is this solving

Referring to the docs here: https://vuefire.vuejs.org/guide/other-firebase-services.html#Other-Firebase-Services, I'm getting a FCM messaging object back from the getMessaging(firebaseApp) but the messaging object contains the incorrect vapid key, keeping me from using getToken() in the same firebase/messaging lib. I couldn't find anywhere in the docs how to attach the public vapid key to the vuefire.config.

Proposed solution

Could there be a way to have the vuefire.config in nuxt.config to have a holder to set the public vapid key so the messaging object from getMessaging has the correct key?

Describe alternatives you've considered

const firebaseApp = useFirebaseApp();
const firebaseMessaging = getMessaging(firebaseApp);
firebaseMessaging.vapidKey = config.FIREBASE_PUBLIC_VAPID_KEY;

doesn't set the correct vapidKey either, not sure where it's even getting this key from.

Also I apologize, maybe this just needs to be a question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant