You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/26 00:56:29 UTC

[GitHub] [cordova-plugin-device] erisu commented on issue #95: Device uuid is null on platform browser

erisu commented on issue #95: Device uuid is null on platform browser
URL: https://github.com/apache/cordova-plugin-device/issues/95#issuecomment-515268027
 
 
   The browser platform does not have access to the devices UUID. This is why `null` is returned for the browser platform.
   
   There are alternatives that you can implement on your own for example `Fingerprint.js`. The goal of `Fingerprint.js` is to use all of the features that the browser has access to create a unique identifier. They advertise a 99.5%  identification accuracy. There is a drawback where a user can do something to make the identifier change.
   
   @janpio for some additional feedback to your question, if the browser had the access permission, the UUID would be most likely related with the OS or a hardware ID.
   
   For example:
   
   -  **macOS** would fetch the UUID from `IOPlatformUUID`. If you have a Mac, you can test this with `ioreg -rd1 -c IOPlatformExpertDevice | grep IOPlatformUUID`
   - **Windows** would use the `MachineGuid` from the registry but _can be edited with administrator permission_.
   - **Linux** would use the `dbus` `machine-id`, but _can be changed with root access_.
   
   For Electron, I have been looking at some npm modules that would use the information that I posted in the example above. Unfortunately, browser, just does not have the necessary permission to access this level of information of the OS for security reasons. Because of that, users must find alternatives solutions like `Fingerprint.js` or create their own UUID and store it somewhere like IndexDB.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org