So I recently upgraded DSCVR to 0.11.3 and Im setting my maxTimeToLive to 7 days. I checked the ic-delegation expiration and it calculates to be about 7 days in the future example:
expiration: "16fd8851c245d84b
If I don’t touch anything on DSCVR and just leave the page open, within about 10 mins the ic-delegation and the ic-delegation will be removed from my local storage and log me out. Sometimes it’s much faster. The only change that I believe has happened is the update to 0.11.3. I don’t see any errors or messages in my console and for testing purposes I only have a single tab open.
I also have not been able to keep up with the updates that have been happening, so I’m curious if there is something I’m doing wrong.
I used to not set any particular maxTimeToLive and literally set a 1 hour duration yesterday. Now that you are saying it, I also noticed it actually expired after few minutes. I also use v0.11.3.
@kpeacockmaxTimeToLive is still the option to use to make session live longer right?
If you pass no options to the IdleManager, it will log you out after 10 minutes of inactivity by removing the DelegationIdentity from localStorage and then calling window.location.reload().
Actually disabling the idle checker seems alright. Had my browser open for more than 10min and the session was still on. Can you try following as well @rckprtr?
Yes, I ran into a snag. I call AuthClient.create() in two different spots in my code. I had to make sure I passed in the idle disable for both of them. I also did not have time to fully test it so I also disable the onIdle call back also.
Thanks. Looks like that was my mistake too. I set the options on my sign-in function but forgot to set these for my sync and sign-out functions too. Extracted a utilities to create the auth-client seems to have done the tricks