Background:
I used the Identity-Sample project provided by the Microsoft team here :
I combined the Identity-Sample project and prerelease nuget projects into an existing project that previously used the latest stable version of Identity.
Problem:
When trying to use 2FA inside the Account/SendCode there is a call to GetVerifiedUserIdAsync() , which is part of the Microsoft.AspNet.Identity.Owin.SignInManager class. (full code here )
GetVerifiedUserIdAsync() returns null (i.e., he could not find the verified user, although I was logged in with 1 factor.) I believe that he does not find the correct cookie.
When I launch the Identity-Sample application, my browser shows _RequestVerificationToken AND TwoFactorCookie , and everything works.
When I launch my application, my browser ONLY displays the _RequestVerificationToken cookie, and I get null .
Question: (if there is a problem with the cookie)
How can I get my application to set a cookie correctly when calling the SignInManager.PasswordSignInAsync(...) method (inside Account/Login )?
Asx
source share