oidc-client-ts
oidc-client-ts copied to clipboard
Idle timeout
Hello, I have an issue with an idle timeout. Is there a way to detect a moment when the user is inactive for X minutes? I want to show him the popup a few minutes before the timeout so he can refresh the token. If he doesn't refresh the token, I want to log him out automatically. Is there a way to do that using React? Also, I would like to change the token expiration time, so I can test it easier, how can I do that? Thanks in advance!
you can register on events. See https://github.com/authts/oidc-client-ts/blob/a6ee4a60bc42d6c5c41f84c34a31728cfb571324/src/UserManager.ts#L107:
- access token expiring
- access token has expired
- ...