I am trying to implement FCM push notification. And my firefox version is 63.0.
Below is my code,
var config = {
apiKey: "${model.apiKey}",
authDomain: "${model.authDomain}",
databaseURL: "${model.databaseURL}",
projectId: "${model.projectId}",
storageBucket: "${model.storageBucket}",
messagingSenderId: "${model.messagingSenderId}"
};
firebase.initializeApp(config)
const messaging = firebase.messaging();
messaging.requestPermission().then(function () {
console.log("Notification permission granted.");
// get the token in the form of promise
return messaging.getToken()
}).then(function(token) {
$('#devicekey').val(token);
}).catch(function (err) {
console.log("Unable to get permission to notify.", err);
});
Notification permission granted
is showing in the console. But showing an error
FirebaseError: Messaging: This browser doesn't support the API's required to use the firebase SDK. (messaging/unsupported-browser).
So that I can't get the token.Why is this so? Please note that am running my application over 'http'.