Specified sender delegation has expired

While testing my web app I get following error after a while:

Body: Specified sender delegation has expired:
Provided expiry: 2021-07-30 06:45:52.520634452 UTC
Local replica time: 2021-07-30 06:49:21.354096222 UTC

I assume it fails because after 5 minutes, the Identity of the logged in user was not recognized as authenticated anymore (timeout).

How long does a user authenticated Identity least?
How to keep active?

I mean I not gonna ask my users to sign in in every five minutes…

1 Like

You can pass maxTimeToLive when you do authClient.login. It’s a 64 bit integer representing nanoseconds.

https://erxue-5aaaa-aaaab-qaagq-cai.raw.ic0.app/auth-client/interfaces/authclientloginoptions.html

Max seems to be 8 days even when I set it to be longer.

4 Likes

Thanks for the hint! I saw it too (notably here) but, was confused about the documentation.

The Identity Identity frontend is free to set an earlier expiry time, but should not create a larger.

It should not be larger than?

So I faced this error again. Shouldn’t the expired time be automatically extended in case of activity or am I missing something?

I am using agent-js, should something be done in order to keep the “session” alive?

1 Like