Closed MovGP0 closed 7 years ago
Implementation is pretty straight-forward:
public async virtual Task<bool> VerifyChangePasswordTokenAsync(TUser user, string token)
{
var tokenProvider = Options.Tokens.PasswordResetTokenProvider;
return await VerifyUserTokenAsync(user, tokenProvider, "ResetPassword", token);
}
You are looking for the ResetPassword method I believe:
No I don't. I want to implement the token verification.
This was a deliberate design choice, to avoid the weird intermediate state of verifying a token, but not using it for an action. Your work around is correct, but its unlikely the flow/api will change, unless we get more people asking for this.
Hi,
What value we have to set for _userManager.Options.Tokens.AuthenticatorTokenProvider.
I'm using 2FA without Entity Framework in core2.0. i've to write custom methods for token generation and verification. the below method reuires string for AuthenticatorTokenProvider. Does anyone know what provider i'veto give?
var is2faTokenValid = await _userManager.VerifyTwoFactorTokenAsync( user, _userManager.Options.Tokens.AuthenticatorTokenProvider, verificationCode);
Thanks, Saravanan
I want to implement a password change flow. Naturally I would expect it to work like this:
Unfortunately, I only find this method:
This makes it confusing what to use as token provider and purpose strings. Allowing to use custom token providers and purposes seems like a good idea, but when just starting out, there should be a default implementation.