title: Using AspNetUserTokens table to store refresh token in ASP.NET Core Web Api
body: <p>I'm working with ASP.NET Core Web API application. I'm trying to implement Jwt Token Based Authentication on top of ASP.NET Identity( built in with database tables). </p>
  
  <p>I have implemented all scenarios like register user, login etc but now trying to implement refresh token flow( where access token get expired, client need to get replaced access token using refresh token) . I have seen people are creating new table (refreshToken) to store refresh token so it can be validated with access token and new access and refresh tokens will be generated</p>
  
  <p><a href="https://www.blinkingcaret.com/2018/05/30/refresh-tokens-in-asp-net-core-web-api/" rel="noreferrer">https://www.blinkingcaret.com/2018/05/30/refresh-tokens-in-asp-net-core-web-api/</a></p>
  
  <p><a href="https://www.c-sharpcorner.com/article/handle-refresh-token-using-asp-net-core-2-0-and-json-web-token/" rel="noreferrer">https://www.c-sharpcorner.com/article/handle-refresh-token-using-asp-net-core-2-0-and-json-web-token/</a></p>
  
  <p>I have created new table(refreshToken) to store refresh token and verify it to generate access token, It works fine but I wanted to see if i can use existing AspNetUserTokens table to handle same scenario. I understand that AspNetUserTokens table is used to confirmation email, forgot password etc.</p>
  
  <p><strong>My question is:</strong> if someone has used AspNetUserTokens to store refreshtoken, Please share idea as usermanager class does not expose direct token model(AspNetUserTokens) and not sure if i use IdentityDbContext, what are the pron and cons ? I have implemented IdentityDbContext but i dont see built in class in Microsoft.AspNetCore.Identity to store token in AspNetUserTokens  </p>
  
  <p>Would be very grateful for some guidance. </p>
  
  <p>Thank you </p>