Reading Hard drive ID

Anyway to read a hard drive id or something similar to create a specific license for each app distributed?

One big problem, the serial number of the device is considered private information and is blocked even by the cordova plugins. I imagine the same of a peripheral. And most devices these days do not use hard disk style devices, other than desktops, etc. What are the target devices for your app? and is it web or native or both? And will your app talk to a server? A server that could do authentication, etc.?

My target was for PC Windows and Mac…trying to see if is possible, to register the specific app to a one license computer…

If you’re doing this as a mobile app the answer is in the phonegap-plugin-device where you can get the devices serial # via device.serial.

If you’re doing this as a PWA then things get a little trickier. What has worked for me is to issue a token during the login process and only allow read/write/update/delete access to that token. Access from any other tokens should be declined or you can say something like:

“You’re only licensed for access from one device and you’re currently logged in on another device.”

You can then give the user one of two options: 1) logout of the other device and continue with the current device or 2) purchase more licenses.

This does not prevent savvy users from hijacking your cookie or session variables and sending the token to multiple users BUT there are ways to thwart that as well… it just depends on how far you’re willing to go to catch cheaters. There’s opportunity costs with every action/reaction.