user5508297 user5508297 - 2 months ago 5
Javascript Question

Google Chrome extension: How to find out if a user has signed in to the Chrome browser?

As part of a Google Chrome extension that I'm building I need to be able to tell if a user has signed in to the Google Chrome browser while the extension is enabled.

How can I do this?

Please note that using OAuth2 (and thus, the

API) is beyond the scope of my project so I need to find another way.

EDIT: my question is not a duplicate of this one because the solution in that thread no longer works.


Check if LSID cookie is set:

chrome.cookies.get({url:'', name:'LSID'}, function(cookie) {
    if (cookie) {
        console.log('Sign-in cookie:', cookie);

manifest.json permissions: "cookies", ""