Finbuckle / Finbuckle.MultiTenant

Finbuckle.MultiTenant is an open-source multitenancy middleware library for .NET. It enables tenant resolution, per-tenant app behavior, and per-tenant data isolation.
https://www.finbuckle.com/multitenant
Apache License 2.0
1.3k stars 265 forks source link

Identity Sample App breaks 2FA #759

Closed ChrisComply closed 11 months ago

ChrisComply commented 11 months ago

The sample https://github.com/Finbuckle/Finbuckle.MultiTenant/tree/main/samples/net6.0/IdentitySample uses IdentityUser and to setup MFA, like normal (https://localhost:7208/megacorp/Identity/Account/Manage/TwoFactorAuthentication).

However any logins after that don't prompt for the MFA code.

If you take a brandnew project with identity, and scaffold out Login, I found that Areas\Identity\Pages\Account\Login.cshtml.cs line 114 will return result.RequiresTwFactor True when MFA is setup, but the sample Finbukle project always returns false.

ChrisComply commented 11 months ago

This was my issue using CheckPasswordSignInAsync thinking it returned the same two factor check as the other sign in methods. It doesn't, nothing wrong with Finbuckle...

AndrewTriesToCode commented 11 months ago

@ChrisComply no worries I appreciate your interest.