Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Two Factor Options not appearing #11804


User avatar
0
fawad29 created

Project: Core with Angular (12.4)

Hi,

Please see below the issue that we are having.

Host

I have enabled Two Factor login on the host, see screenshot below.

When I login to the host, it asks for two factor authentication, which is fine.

Tenant

I then login to the Tenant, and go to the security tab, it does not show the options for Enabling email or SMS.

Our requirement is that some tenant may want to use SMS for two factor, others may want to use email or authenticator app.

When we check the code, the options are not appearing because multi tenancy is enabled and due to below condition. Can you advice?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think the ngIf you shared has a value true because I can see Enable two factor checkbox. But the problematic condition in your case is the one below;

    If you change this condition to settings.security.twoFactorLogin.isEnabled && (!isMultiTenancyEnabled || settings.security.twoFactorLogin.isEnabledForApplication) it should work, could you try that ?

  • User Avatar
    0
    fawad29 created

    Thanks for your reply.

    Yes, I can change the conditions in Angular as well as on the TenantSettingsAppService in the Core project, however, is there a reason for these conditions? If I change the conditions, it will not break something else?

    It seems that Tenant are not able to set up Email and SMS authentication if multi tenancy is enabled due to these conditions?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @fawad29

    This seems like a bug to me, we will also check it and fix it in the original code base. Please follow https://github.com/aspnetzero/aspnet-zero-core/issues/5083