Deletion of device shares sorted by time to limit total number of shares

Hi, we need a way to delete all the older device shares to prevent the bloating of number of shares. In our current implementation we are creating a share for every new browser the user logins in. Since we haven’t been deleting the older shares we have users with more than 6 shares. This has increased the sdk initialisation time significantly. I have tried the https://web3auth.io/docs/sdk/core-kit/tkey/usage#delete-a-share approach. This only takes 1 share at a time, and since most users have more than 5 existing shares we are facing a difficulty while deleting them.

However, on a previously asked question it mentioned that there is feature being built which helps delete all the older shares which are sorted by time. How exactly does this work? If not what is the best way to go about this?


  • SDK Version: 12
  • Platform: Web

@developer Welcome Aboard!

The mechanism for auto-delete extends only across Plug and Play SDKs not Core-kit since for Core Kit the wallet management flows are not hosted on app.openlogin.com . This means that users will not be redirected to a different domain for authentication.

The documentation you shared is the correct approach and you would need to handle the share deletion.

Is there an option for bulk deletion of the older shares? Doing it one by one in a loop is not working out.

You can refer to a suggested solution on this thread 403 during bulk_set_stream call and unable to login

Please try remove the newShare generation ( do not store to device ) in your implementation.

Only generate new shares on request/demand. (eg, backup share, or button to add device share)

@developer Do you have any further questions?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.