mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-27 13:29:34 +07:00
* Initial copy of _archive/apps/samples/identity * Modify to run be an extension rather than a Chrome App. * Update extension to manifest v3 * Update README * Remove references to chrome://identity-internals * Use Promises rather than callbacks See https://developer.chrome.com/docs/extensions/develop/migrate/api-calls#replace-callbacks * Apply code-review markups. * Apply more code-review markups * Format with prettier * Use Promise.catch instead of runtime.lastError * Update screenshot --------- Co-authored-by: Oliver Dunk <oliverdunk@google.com>
834 B
834 B
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.
Running this extension
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Click the extension icon to open the UI.
