examples/redux-firestore/src/utils/firebaseMessaging.js
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)
    })
}
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)
    })
}
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 ) } ) }
Get messaging token from Firebase messaging
Get messaging token from Firebase messaging