-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support idle management in AuthClient #547
feat: support idle management in AuthClient #547
Conversation
Allows the authClient to register actors to automatically invalidate them going idle, or revalidate them after logging in
51be652
to
e826b43
Compare
https://github.com/dfinity/agent-js into SDK-307-support-invalidating-and-replacing-identities
Allows the authClient to register actors to automatically invalidate them going idle, or revalidate them after logging in
https://github.com/dfinity/agent-js into SDK-307-support-invalidating-and-replacing-identities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. The tests were clear and the code was easy to understand. I left one comment about whether this would ever need to be used in a nodejs environment - it wouldn't support that as-is clearly, but is environment compatibility something we should add to the README?
func.apply(context, args); | ||
}; | ||
clearTimeout(timeout); | ||
timeout = window.setTimeout(later, wait); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is auth-client ever meant to be used in a nodejs environment?
Description
Introduces a new IdleManager to detect when a user has gone idle, and calling callbacks
Fixes SDK-307
How Has This Been Tested?
Checklist: