Locally on my mac book, my chrome extension is trying to identify whether or not my chrome browser is signed into a specific website. I am referencing these docs. However, the cookie data I am getting back for this specific website is the same regardless of whether or not my browser has authenticated with the site. This is what the cookie looks like printed to console:
{
"domain": "some-random-string.ngrok.io",
"hostOnly": true,
"httpOnly": true,
"name": "_the_app_session",
"path": "/",
"sameSite": "unspecified",
"secure": false,
"session": true,
"storeId": "0",
"value": "random sttring"
}
This is the code I am running:
// Attempt
chrome.cookies.getAll(
{"url": "https://some-random-string.ngrok.io", "name": "_the_app_session"},
function(cookies) {
console.log('cookies', cookies)
}
)
// Attempt
chrome.cookies.get({"url": "https://some-random-string.ngrok.io", "name": "_the_app_session"}, function(cookie) {
console.log('cookie', cookie)
});
How can my chrome extension identify whether or not my browser is signed into a specific website?
This is my manifest file:
{
"manifest_version": 3,
"icons": {
"16": "cooking-icon.png",
"128": "cooking-icon.png"
},
"name": "Some app",
"description": "A Chrome extension app",
"version": "0.1.0",
"action": {
"default_title": "App",
"default_popup": "popup.html"
},
"permissions": [
"cookies",
"scripting"
],
"host_permissions": [
"http://*/*",
"https://*/*"
]
}