Comments (4)
- The module does not consider
$http
activity to determine idleness. The goal of this module is to look for user input/interaction. - Yes, you can manually interrupt by injecting
$idle
(orIdle
in the upcoming v1.0.0 release) and callingwatch()
.
from ng-idle.
I meant that my session will expire if user didn't do anything that will trigger API calls. Did I understand correctly that Keepalive
service can help me with this? And I was thinking of: If user will see modal and do any interaction to make an http call?
from ng-idle.
Oh, sorry. Yes. By default, the idle service will use keepalive. keepalive will ping every 10 minutes (by default, configurable) while the user is active. It will stop pinging once the user enters the idle state. When the user returns to the active state after going idle, keepalive will immediately ping, and then resume pinging as I previously described.
All you need to do is configure $keepaliveProvider.http()
(or KeepaliveProvider.http()
in v1.0.0) and it'll start sending HTTP requests for you using the options you specified. This works great for cookie-based session tokens because (in most cases) you just send a request to an HTTP endpoint and the browser will automatically include the session cookie for you. If that endpoint updates the session cookie and sends it back, the browser will take care of that for you, too.
However, if you need more control over sending and processing keepalive requests, you can leave http()
option unset, listen for the $keepalive
event (or KeepAlive
in v1.0.0) and handle it yourself.
from ng-idle.
Thanks, now it is clear. When are you going to release v1.0.0?
from ng-idle.
Related Issues (20)
- [Question] Keepalive event in multiple tabs
- Issue in multiple tabs HOT 2
- Angular 5 - generic component child used in several main component not working
- Not want to reset timer in case of user intervention in app HOT 1
- Any plans to upgrade to Angular 6 HOT 1
- AngularJs - Unknown provider : IdleProvider HOT 1
- ng-Idle/core onIdleStart and onTimout function executing multiple times
- Having issues with ng-idle/core onIdleEnd & Mat-Dialog HOT 1
- keepalive onPingResponse subscribe response doesnt work right
- set url string parameter of http() dynamically
- Using JS Alert does not timeout until OK is Clicked HOT 1
- Key Management: Hardcoded Encryption Key HOT 1
- Select box (with multiple selections) not working properly
- unable to mock inactivity time with cypress clock/tick()
- How to use localstorageservice to handle in multiple tabs in the same browser HOT 1
- Incompatible with Angular 10 HOT 1
- Don't work with IFRAME HOT 3
- Keepalive interval not respected
- Implement a privacy preserving mode functionality avoiding usage of the persistent browser localStorage
- ng-idle not working for iOS in Ionic cordova
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-idle.