<p>I'm using Web API and Asp.net Identity to perform user related Operations.
Trying to Reset the Password With token Generated from GeneratePasswordResetTokenAsync method,
but I'm getting the error "Invalid Token" 
Note:
Using Kubernetes and having Multiple Instances(pods) of the application, I'm facing this error. However, when running locally, it works fine.</p>

<pre><code>private static UserManager&lt;IdentityUser&gt; _userManager;

public async Task&lt;IActionResult&gt; ForgotPassword(string email)
{
  var user = await _userManager.FindByEmailAsync(email);
  var resetToken = await _userManager.GeneratePasswordResetTokenAsync(user);
  result = await SendForgotPasswordLinkEmail(email, resetToken);
  if (result)
    return Ok(result);
  else
    return BadRequest(result);
}
public async Task&lt;IActionResult&gt; ResetPassword(model)//model contains all neccessary values
{
  var user = await _userManager.FindByEmailAsync(model.Email);
  var check =await_userManager.ResetPasswordAsync(user,model.ResetPasswordToken,model.Password);               
}
</code></pre>

Balaji Arun
<p>thanks @Machado for your reference: Here's a <a href="https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers?view=aspnetcore-3.1&amp;tabs=visual-studio" rel="nofollow noreferrer">link</a> <br></p>
<p>problem is each instance has its own memory where the data are stored.
and we can't ensure that the same instance created the reset token will handle the change password because of that it let to mismatches</p>
<p>to solve this issue we need to create a store point where each instance can share the data for communication which prevent data mismatch more info about this is in the link</p>
<p><strong>another workaround:</strong><br>
you can create your own salt key for the user and with that, you can confirm the user to reset password and resetting can be done by using</p>
<ul>
<li>Remove Password Method</li>
<li>Add Password Method
<br></li>
</ul>
<p><strong>(Note: vulnerability inversely proportional to your salt key encryption)</strong></p>
