title: NodeJS, how to handle refresh token for different devices/browsers
body: <p>I'm building a nodeJS (express with mongoose) rest API which utilizes short life span <strong>JWTs</strong> and refresh tokens to keep the users logged-in. So far, I managed to create a system that creates and verifies both token types.</p>
  
  <p>The issue that I'm facing right now is that, if someone logs in on a different device, it will generate a new <strong>refresh token</strong> for that user and they wouldn't be able to use the <strong>refresh token</strong> on the original device.</p>
  
  <p>How can you determine from where the user logged in so that I can have different refresh tokens for each device?</p>