Starts in:
2 DAYS
1 HR
55 MIN
22 SEC
Starts in:
2 D
1 H
55 M
22 S
Open Closed

Override Send Security Code email template #7267


User avatar
0
DominaTang created

Login as host admin, there is text template setting for security code email template, which is:

<h3>{{L "EmailSecurityCodeSubject"}}</h3>

<p>{{L "EmailSecurityCodeBody" model.code }}</p>

So I add a "Hello" to the template, save. Login in as an user of a tenant, the email is still old template.

Manually insert an record in [AbpTextTemplateContents] with exact same template content for the tenant (sent TenantId column value) for the table. The email content still not changed.

ABP Framework 7.2.1


6 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This is because the text template is a multi-tenant entity.

    could you try login as an admin user of a tenant to change the security code email template?

  • User Avatar
    0
    DominaTang created

    Thanks, my script updated the wrong tenantId.

  • User Avatar
    0
    DominaTang created

    I there a way to add User Full Name to the template, from https://docs.abp.io/api-docs/commercial/3.3/api/Volo.Abp.Account.Public.Web.Pages.Account.VerifySecurityCodeModel.html#properties

    There is only userId property in the model.

    Also, is there a way to update expire time to 5 minutes? https://support.abp.io/QA/Questions/2583/Is-there-an-Expiration-on-the-Confirm-Email-Link-Password-Reset-Link-or-2-Factor-Code

  • User Avatar
    0
    DominaTang created

    I also met a weird case; Tenant table data:

    However, when I login as user of tenant in above screenshot, it still ask me to provide security code.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I there a way to add User Full Name to the template, from https://docs.abp.io/api-docs/commercial/3.3/api/Volo.Abp.Account.Public.Web.Pages.Account.VerifySecurityCodeModel.html#properties

    You can override the SendTwoFactorCodeAsync method of AccountAppService

    Also, is there a way to update expire time to 5 minutes?

    See https://learn.microsoft.com/en-us/answers/questions/842342/extend-the-2fa-token-expiration-in-asp-net-core

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    However, when I login as user of tenant in above screenshot, it still ask me to provide security code.

    I guess this is because of the cache. could you try clear cache?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06