code: function updateUserProfileWithToken(messagingToken) {
    const currentUserUid =
      firebase.auth().currentUser && firebase.auth().currentUser.uid
    if (!currentUserUid) {
      return Promise.resolve();
    }
    return firebase
      .firestore()
      .collection('users')
      .doc(currentUserUid)
      .update({
        messaging: {
          mostRecentToken: messagingToken,
          updatedAt: firebase.firestore.FieldValue.serverTimestamp()
        }
      })
  }
docs: Write FCM messagingToken to user profile
  @param {String} messagingToken - Token to be written to user profile