This code asserts that an auth key (GCM sender ID) is required when a push subscription is sent from FCM. However, this is not true because FCM fully implements VAPID, as can be read here: "With VAPID you no longer need to sign up for an account with GCM".
My suggestion therefore is to remove this function clause altogether, as well as this part.
This code asserts that an auth key (GCM sender ID) is required when a push subscription is sent from FCM. However, this is not true because FCM fully implements VAPID, as can be read here: "With VAPID you no longer need to sign up for an account with GCM".
My suggestion therefore is to remove this function clause altogether, as well as this part.