Open Closed

Implement Idle Timeout on the Web Public App #9689


User avatar
0
AlderCove created

(Please provide your ABP version and other relevant solution information here, as hinted by the template)

  • ABP 9.2.0
  • MVC/Razor
  • Public Web Site
  • Separate Auth-Server App

Hi

How can we get the idle timer to work in the Web Public App?

I added a reference to the Volo.Abp.Account.Pro.Public.Web.Shared 9.2.0 package and added the module dependency. What else do I need to configure?

Thanks Jamie


5 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To enable the Idle Session Timeout feature in your ABP Web Public App (MVC/Razor, ABP 9.2.0), follow these steps:

    1. Ensure you have referenced the correct package:

      • Volo.Abp.Account.Pro.Public.Web.Shared (as you already did).
    2. Add the module dependency in your module class:

    [DependsOn(typeof(Volo.Abp.Account.Pro.Public.Web.Shared.AbpAccountProPublicWebSharedModule))]
       public class YourWebPublicModule : AbpModule
       {
           // ...
       }
    
    1. Enable and configure Idle Session Timeout in the UI:

      • Go to Settings > Account > Idle Session Timeout in your application.
      • Enable the feature and set the desired timeout value (in minutes).
    2. Behavior:

      • When the idle session timeout is reached, the user will see a warning modal.
      • If the user does not respond within 60 seconds, they will be logged out automatically.
    3. Note:

      • If the user selects "Remember Me" on the login page, the idle session timeout feature will be disabled for that session.

    No additional code configuration is required beyond referencing the package, adding the module dependency, and enabling the feature in the settings UI.

    Sources:

    • https://abp.io/docs/latest/modules/account/idle-session-timeout

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Add Volo.Abp.Account.Pro.Public.Web.Shared will be fine.

    Can you check your public website page HTML code to see if your page includes Idle component?

    Thanks.

  • User Avatar
    0
    AlderCove created

    [maliming] said: hi

    Add Volo.Abp.Account.Pro.Public.Web.Shared will be fine.

    Can you check your public website page HTML code to see if your page includes Idle component?

    Thanks.

    Yes, that's being included and seems to be working.

    Also, I have another standalone angular app - it uses the AccountPublicConfigModule but not the AccountAdminConfigModule and the idle timer doesn't work with that app. How do you suggest getting that working? We don't want admin capabilities in this angular app. Would it make more sense for the idle timer to be part of the public module or a shared account module? Or, am I misunderstanding how its implemented?

    Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I will ask our Angular team about How to enable Idle feature in Angular app.

    Thanks.

  • User Avatar
    0
    sumeyye.kurtulus created
    Support Team Angular Expert

    Hello idle session timeout feature is designed to be on the admin configuration. So, it is available for AccountAdminConfigModule rather than AccountPublicConfigModule.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20