-
Notifications
You must be signed in to change notification settings - Fork 864
Revert the fix introduced in https://github.com/aspnet/Identity/issues/1395 #1483
Comments
Hrm this code was just reverted to what it looked like in 1.1.2 I guess I must have introduced ChangePhoneNumberTokenProvider in 2.0 to make things consistent at some point, as it doesn't appear to exist in 1.1.2's TokenOptions. https://github.com/aspnet/Identity/blob/rel/1.1.2/src/Microsoft.AspNetCore.Identity/TokenOptions.cs I'll take a look |
@Eilon has decided we'll patch this but quirk it. |
A quirk to use the logic added in the "previous" iteration of 2.0.3 or the logic used in 2.0.0? In both cases, I'm not sure it makes much sense. |
Its going to be a quirk that lets you get the old 2.0.0 default value, basically if for whatever reason they want the 2.0 DefaultProvider instead of the DefaultPhoneProvider from token options. Instead of using the quirk they could just set the option too, but this is the pattern that is used for breaking changes generally (add a quirk mode) |
lol, are there people that are crazy enough to force their users to enter a token protected by Data Protection in a web form? Adding a quirk doesn't harm anyone, so... |
I argued against the quirk mode as well, but what can you do :) |
Merged into 2.0.3. via aspnet/Universe@60d6045 |
Thanks for fixing that 👍 |
@PinpointTownes thanks for reporting it! 😄 |
When @HaoK fixed #1388, he decided to update the
GenerateChangePhoneNumberTokenAsync()
/ValidateChangePhoneNumberTokenAsync()
methods to directly use the internal Rfc6238AuthenticationService class instead of using the provider configured in the options.Unfortunately this fix is bad and will break apps using a custom token provider (e.g not based on TOTP) for the "change phone number tokens".
Consider reverting this change and fixing the bug at the root by changing this line to point to the phone provider (by default):
Identity/src/Microsoft.Extensions.Identity.Core/TokenOptions.cs
Lines 63 to 69 in f147951
The text was updated successfully, but these errors were encountered: