Skip to content

Orchard Core 2.1.2 - UserManager and error No IUserTwoFactorTokenProvider<TUser> named 'Phone' is registered #17221

Answered by MikeAlhayek
MarGraz asked this question in Q&A
Discussion options

You must be logged in to vote

@MarGraz
In OC 2, we don't register all token providers by default as we did before. In orchard, the only place to use the Phone number provider is in "OrchardCore.Users.2FA.Sms". So if you want that token provider in your custom project, you can either add dependency on "OrchardCore.Users.2FA.Sms" feature which provides it and also enable SMS two factor authentication. Or, configure the token provider in your own project "since your project seems to depend on it" like this

var phoneNumberProviderType = typeof(PhoneNumberTokenProvider<>).MakeGenericType(typeof(IUser

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MikeAlhayek
Comment options

Answer selected by MarGraz
@MarGraz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants