RealmApp.logIn: How is the "deviceId" generated and can it be modified later?

Dear MongoDB community,

I am currently working with the MongoDB Web SDK and have been using the RealmApp.logIn method to authenticate users in my application. While exploring the documentation and resources available, I noticed that there is no specific information about the generation of the “deviceId” field when using this method.

My question pertains to the following:

  1. Is there any documentation or resource available that explains the details of “deviceId” generation?
  2. Can the “deviceId” be modified or updated later, or is it a fixed value once created during authentication?
  3. Will the ‘deviceId’ remain the same if I log in through the same tablet after 30 days from a different network?

Thank you very much for your time and assistance!

Hello @Artjom_Valdas

  1. There is no public-facing documentation because deviceId is used for internal analytics purposes.
  2. It is not intended to be used or modified by a user.
  3. We are generating a random device id that will be used for all connections from this device regardless of the app or user making the connection. It should be the same even 30 days after regardless of the network. However, if an application is deleted and reinstalled it will likely generate a new device ID.

Would you be able to share our details of why you would like to use deviceID in your application?