Identifying Signed-In Google Users in Chrome Extension Tabs with Multiple Accounts Connected

96 views
Skip to first unread message

Tamar Y

unread,
Aug 9, 2023, 7:55:10 AM8/9/23
to Chromium Extensions
Hello everyone,

I'm working on a Chrome extension that interacts with the Google Cloud Platform (GCP) application. In GCP, users can sign in with multiple Google accounts across different tabs within the same Chrome browser session. My goal is to identify the specific Google account that is signed in to a particular tab within the GCP application.

I've explored the chrome.identity.getProfileUserInfo API, but it seems to provide information about the user profile that is signed in to the entire Chrome browser, rather than the user associated with a specific tab.

Additionally, I'm considering using JavaScript to extract user information from the profile circle in the top right corner, which displays user icons and details. However, I'm concerned that relying on a specific web page element might lead to issues if the layout changes in the future.

Is there a way to achieve this granularity within a Chrome extension? I want to display the currently signed-in user's information.


Thank you for your time and assistance!
Reply all
Reply to author
Forward
0 new messages