diff --git a/firebase.js b/firebase.js index 7f846c16..4ba9c436 100644 --- a/firebase.js +++ b/firebase.js @@ -16,7 +16,7 @@ export const requestPermission = async () => { if (permission === 'granted') { const token = await getToken(messaging, { - vapidKey: process.env.NEXT_PUBLIC_VAPID_KEY, + vapidKey: process.env.NEXT_PUBLIC_FCM_VAPID_KEY, }); console.log('Notification token:', token); return token; diff --git a/firebaseConfig.js b/firebaseConfig.js index 061d8c31..a578ec27 100644 --- a/firebaseConfig.js +++ b/firebaseConfig.js @@ -1,10 +1,10 @@ const firebaseConfig = { apiKey: process.env.NEXT_PUBLIC_FCM_API_KEY, - authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN, - projectId: process.env.NEXT_PUBLIC_PROJECT_FCM_ID, - storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET, - messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER, - appId: process.env.NEXT_PUBLIC_FCM_APP_ID, + authDomain: process.env.NEXT_PUBLIC_FCM_AUTH_DOMAIN, + projectId: process.env.NEXT_PUBLIC_FCM_PROJECT_FCM_ID, + storageBucket: process.env.NEXT_PUBLIC_FCM_STORAGE_BUCKET, + messagingSenderId: process.env.NEXT_PUBLIC_FCM_MESSAGING_SENDER, + appId: process.env.NEXT_PUBLIC_FCM_FCM_APP_ID, measurementId: process.env.NEXT_PUBLIC_FCM_MEASUREMENT_ID, };