I use the code below to obtain a token from firebase :
const messaging = firebase.messaging();
messaging.requestPermission()
  .then(() =>{
    return firebase.messaging().getToken();
  }).then(token => {
     saveTokentoServer(user.uid, token);
  })
the problem is that i receive the same token for different users. I am not able to send out targetted messages.
Does anyone know how I can obtain different token for different users ?
I have spent two days search for answers. Why is my web application not receiving unique token ?