Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome browser unique identification

I am trying to build an app for chrome based on my api. Is there a unique id in chrome browser which i can store to identify the chrome browser on which the app is being installed. Maybe something like getting the signed in Google account from the browser or any other string unique to every Google chrome installation?

like image 227
maths Avatar asked Sep 05 '26 13:09

maths


1 Answers

Unique installation? Google is actively trying to prevent fingerprinting (e.g. chrome.usb API is not allowed to enumerate devices, etc.), so - no perfectly reliable methods. You can try collecting various pieces of info and try to fingerprint, but it's not recommended.

You can request access to the Google credentials for people signed into Chrome if you ask for "identity" and "identity.email" permissions, with chrome.identity.getProfileUserInfo:

chrome.identity.getProfileUserInfo(function(info) {
  // Use info.id, it's a unique token that's bound to the account
  //   but does not expose email (better for privacy)
});

You can also use chrome.storage to keep some kind of ID token. You can randomly generate it or, better, generate it on your API side on request.

If you keep it in local storage area - it will be kept per browser profile, in sync - it will replicate across all signed-in instances if sync is enabled. Note that both will be wiped if the user uninstalls your app.

like image 160
Xan Avatar answered Sep 08 '26 07:09

Xan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!