ExternalSignInAsync - 它什么时候 return SignInStatus.RequiresVerification?

ExternalSignInAsync - when does it return SignInStatus.RequiresVerification?

我正在使用 VS 2013 的标准 MVC 模板,并使用带有外部 ID 的登录名,即 Google、Facebook 等

AccountController.ExternalLoginCallback中调用SignInManager.ExternalSignInAsync,结果可以是SignInStatus.Success.LockedOut.RequiresVerification和[=17=之一].

通过在 dbo.AspNetUsersLockoutEndDateUtc 栏中输入比现在晚的时间,我已经能够 return LockedOut

何时或如何 return RequiresVerification?

我想使用这个身份框架,但要进行一些自定义。

如果您使用双因素身份验证,则登录将return SignInStatus.RequiresVerification 供用户输入验证码。

Two-factor authentication using SMS and email with ASP.NET Identity

ExternalSignInAsync return RequiresVerification if :

dbo.ASpnetUsers 已将用户设置为 true TwoFactorEnabled 和 EmailConfirmed 并且应确认用户电子邮件,电子邮件不能为空或为空。