I'm using GenerateEmailConfirmationTokenAsync to generate token to confirm email. By default, it will generate a 6 digits, Ex: 534623. But end-user requirements wants it is 4 digits, Ex: 5346.
string code = await UserManager.GenerateChangePhoneNumberTokenAsync(user.Id);
/// I would like code variable is 4 digits
Then verify it at
var result = await UserManager.ChangePhoneNumberAsync(userId, code);
/// I would like to verify with 4 digits only
I searched and knew that I need to customize DataProtectorTokenProvider. But I did't find out how to customize it.
Thanks