Search code examples
javascriptjqueryangularunique

How to get client system's unique id in javascript or angular 2/4?


I want to show the user's information whenever a user visits the site without login and register as I don't want to save user's mobile number, email etc and for the user no need to login and register. like in mobile devices based on device id mobile apps can get information from the server side without login and register. same I want whenever a user visits my website user don't need to login to get his information. I have tried with fingerprint js but I can get browser's id and It is not unique in all browser. I want to develop this website in angular 2/4.


Solution

  • I don't think you can.

    It's easy to do so on mobiles because you have access to the system, like a standalone application.

    In a browser, you can't have access to the user's system, only to their browser.

    And the fingerprint library is very clear about that, it gives a weak guarantee of uniqueness and rely purely on the browser specifications.

    What you could do instead is tie the unregistered users to the "Anonymous" user, this is what I would do.