How to manage the Device ID

Hi, I have some questions about the device ID and how it relates to the device that the user is using, namely:

  • How should I generate a device ID? In the demo, it’s a simple UUID. However, this approach doesn’t seem that great because how would I know if the user logs in from another device and uses the same device ID to access the wallet? Is there a better way to go about this, maybe where the device ID is based on data from the actual device that the user is using?
  • Where should I store the value on the device so that it can’t be easily removed?
  • What to do if it is removed? Does the backup/recovery process return the device ID as well?

Thanks in advance.

Hi @marcio.rocha thanks for your questions and feedback. Please find answers to your questions below:

the device ID is generated and maintained in the data model by the customer - Data Model

If end user migrates to a new physical device, when he/she authenticates back into the customer app, customer should identify that he/she already has an existing device ID registered and initiates the recovery process.

If end user wishes to have multiple devices, then each device he/she is logged in will have a different device ID.

Hi @Wilfred, sorry if I’m missing something but I’m still not sure how would I know that a certain device ID would correspond to a certain device.

Consider that I have device 1 with device ID A and device 2 with device ID B.
If I erase the data from my device 2 and try to log in again, I’ll see that I have two device IDs registered to me. However, how would I know if my device 2 should use the device ID A or B (being B the correct choice)?