Authorization Issue

Hi,
I noticed a possible issue when generating a dotnet 8 app with auto rendering (wasm) while playing with two factor authentication and multi-Tenants. When you enable both two factor and multi tenant when you try to create a new tenant it tries to email you. the problem is the tenant doesn't have a email address so the app throws an exception.

I am starting over and trying to make sure i can recreate problem.
Thanks,
Mark

I was able to replicate the problem. Here is how to resolve it in your code:

[HttpPost]
public async Task<IActionResult> Login(string userName, string password, string redirectUrl)
...
   var isTenantsAdmin = userName == "tenantsadmin" && password == "tenantsadmin";
   var isTwoFactor = await userManager.GetTwoFactorEnabledAsync(user);
   if (!isTwoFactor && !isTenantsAdmin)
   {
...

It will be in our template for our next update.

Thank you very much
Mark