Agent-JS 0.13.1 - IndexedDb for Auth-Client

A new minor version of agent-js is out!

With this version, the auth-client now stores delegations in indexeddb by default. No code changes are required, unless you want to continue using localstorage. In that case, import the LocalStorage interface from @dfinity/auth-client and pass it in as the storage implementation in the create options.


Cool improvements, it will ease the use of agent-js in web workers :+1:

For those looking to upgrade and have already users in production. If you use long lasting session and want to prevent your users to have to sign-in again after the update, I would advise to wait a bit.

agent-js v0.13.0 tries to migrate localstorage session to new idb values to avoid users to have to sign-in again but I think I found an issue in that process. I provided a small PR #608.

Patch is live. Recommendation is to use 0.13.1!


Awesome! Bumped agent-js in, updated the web workers (PR) and it’s already live!

It’s so much convenient and resilient to query idb than having to pass the delegation over.

Thanks for that sweet improvement @kpeacock :+1: