खुला हुआ बंद किया हुआ

User is null when using two-factor login #869


User avatar
0
Johannes बनाया था
  • ABP Framework version: v3.3.0
  • UI type: Angular
  • DB provider: EF Core

We've implemented our own login controller for use by an external app. The login endpoint uses the signinmanager: protected SignInManager<Volo.Abp.Identity.IdentityUser> SignInManager { get; } And logs in:

var signInResult = await SignInManager.PasswordSignInAsync(
                login.UserNameOrEmailAddress,
                login.Password,
                login.RememberMe,
                true
);

This works fine for users without 2-factor enabled. When 2-factor is enabled, we get the expected 2-factor cookie back:

Which we then provide in the header when calling a SendSmsSecurityCode endpoint.

This it where we get confused: SignInManager.GetTwoFactorAuthenticationUserAsync() returns null. How can this happen? Are we doing something wrong?


4 उत्तर (ओं)
  • User Avatar
    0
    maliming बनाया था
    सहायता दल Fullstack Developer

    hi

    Can you set a break poing at SendSmsSecurityCode method to confirm that cookies are sent.

  • User Avatar
    0
    Johannes बनाया था

    The Identity.TwoFactorUserId cookie is included as seen here

  • User Avatar
    0
    maliming बनाया था
    सहायता दल Fullstack Developer

    hi @Johannes

    Can you share a simple project to reproduce this problem? liming.ma@volosoft.com

  • User Avatar
    0
    Johannes बनाया था

    We fixed it, it was a problem with multitenancy.

Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11