Base solution for your next web application
Open Closed

Token is expiring before reaching timeout limit #10534


User avatar
0
shedspotter created

Hi,

product version = 9.0.1 product type = Angular product framework type = .net core 3.1

Set the 2FA timeout to 900 secs (15 mins) like that

export class ValidateTwoFactorCodeComponent extends AppComponentBase implements CanActivate, OnInit, OnDestroy { recaptchaSiteKey: string = AppConsts.recaptchaSiteKey; code: string; submitting = false; **remainingSeconds = 900;**

Log in to a user account where the 2FA is enabled for a user Select Email for activation code to be received Submit the activation code after 120 secs (when the time remaining displays <780 secs )

Please let me know how can I achive that.

Thanks


1 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @shedspotter

    It is not the place you should change. Angular side of the value is just for ui. It will be loaded from server side see: https://github.com/aspnetzero/aspnet-zero-core/blob/ca3c0a5bbef44b649902d055c6838bc4d0b4a26b/angular/src/account/login/validate-two-factor-code.component.ts#L48

    Here is the place that you should change https://github.com/aspnetzero/aspnet-zero-core/blob/ca3c0a5bbef44b649902d055c6838bc4d0b4a26b/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Core/Authentication/TwoFactor/TwoFactorCodeCacheItem.cs#L12