Files
chrome-extensions-samples/api-samples/identity
Oliver Dunk 8cf0e9a827 Fix linter error and run on PRs (#1447)
Fixes a linter error in the `identity` API sample, and updates the
linter to run on all PRs going forward.
2025-03-31 15:17:58 +02:00
..

chrome.identity

A sample extension that uses the Identity API to request information of the logged in user and present this info on the screen. If the user has a profile picture, their profile image is also fetched and shown in the app.

Overview

This extension uses the getAuthToken flow of the Identity API, so it only works with Google accounts. If you want to identify the user in a non-Google OAuth2 flow, you should use the launchWebAuthFlow method instead.

screenshot

Running this extension

  1. Clone this repository.
  2. Load this directory in Chrome as an unpacked extension.
  3. Click the extension icon to open the UI.