We need to integrate a way to persist one user information, the number of registered device, because when we create the new shard for authenticate a new device we must set a new id for this shard, the id can't be always the same and must be one more for each device.
There are at least tree possible solution that allow to maintain this information locally to the app:
store into a file inside the application
use browser store session
use neDB, a simple and lightweight database mongo like, written in plain javascript used for store simple information in electron application
We need to integrate a way to persist one user information, the number of registered device, because when we create the new shard for authenticate a new device we must set a new id for this shard, the id can't be always the same and must be one more for each device.
There are at least tree possible solution that allow to maintain this information locally to the app: