You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.
Hello, I'm confused with the token providers registration.
When calling UserManager<T>.GeneratePasswordResetTokenAsync without any token provider registered it fails with No IUserTokenProvider named 'Default' is registered.
We cannot register IUserTokenProvider since it does not longer exists.
From UserManager source code I figured out that the correct iface is IUserTwoFactorTokenProvider<T> but the token generation still does not work until we assign the token provider manually:
services.AddIdentity<User, Role>(options =>
{
...
options.Tokens.ProviderMap.Add("Default", new TokenProviderDescriptor(typeof(IUserTwoFactorTokenProvider<User>)));
})
So is this a bug or feature? How is the correct approach?
Hello, I'm confused with the token providers registration.
When calling
UserManager<T>.GeneratePasswordResetTokenAsync
without any token provider registered it fails withNo IUserTokenProvider named 'Default' is registered.
We cannot register IUserTokenProvider since it does not longer exists.
From UserManager source code I figured out that the correct iface is
IUserTwoFactorTokenProvider<T>
but the token generation still does not work until we assign the token provider manually:So is this a bug or feature? How is the correct approach?
Thanks.
PS: StackOverflow thread about this is here
The text was updated successfully, but these errors were encountered: