code: function getMessagingToken() {
    return firebase
      .messaging()
      .getToken()
      .catch(err => {
        console.error('Unable to retrieve refreshed token ', err) // eslint-disable-line no-console
        return Promise.reject(err)
      })
  }
docs: Get messaging token from Firebase messaging