Feature Request / Discussion: Offline Capabilities for Angular UI #19165
-
Hello ABP awesome community, I'm working on enhancing the offline experience within an Angular web application built on the ABP framework. Currently, I'm facing the following challenges when internet connectivity is unstable: Core Requests: On every page/window load, there are 4 mandatory network requests:OpenID: openid-configuration, and jwks (plus a token refresh if necessary) Objective: My aim is to provide users, particularly in point-of-sale scenarios, the ability to:
Feature Consideration:Would it be feasible to introduce a caching or storage mechanism for the responses of these four core requests? This would allow the application to open subsequently, even with limited or no internet connection. To minimize user disruption, I propose using longer token validation periods. Discussion Points:Caching Strategies: What would be the most suitable caching strategies (e.g., Service Workers, IndexedDB, LocalStorage) within the context of the ABP framework and Angular architecture? Additional NotesI understand that initial network requests for authentication and core data are essential for first-time users. My focus is on enhancing the experience for subsequent access when a user is already logged in. I welcome your insights, suggestions, and potential approaches. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I found out after checking the source code that there is an option called skipGetAppConfiguration to skip calling application-configuration and application-localization requests. However, for OpenID requests, we need to skip calling authService init. So we need an option similar to skipGetAppConfiguration Lastly, after enabling skipGetAppConfiguration and skipInitAuthService, we will be able to write custom implementation to load each request when needed only and to caching its response to be used in later (in office mode). |
Beta Was this translation helpful? Give feedback.
I found out after checking the source code that there is an option called skipGetAppConfiguration to skip calling application-configuration and application-localization requests.
However, for OpenID requests, we need to skip calling authService init. So we need an option similar to skipGetAppConfiguration
that skips calling authService.init() even if authService is injected. Let's call the new option skipInitAuthService
Lastly, after enabling skipGetAppConfiguration and skipInitAuthService, we will be able to write custom implementation to load each request when needed only and to caching its response to be used in later (in office mode).