Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Firebase messaging showing wrong vapid key with calling getMessaging #1574

Open
@JacobStewart20

Description

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /