google-userinfo

This add-on fetches the user’s info from their Google account and displays their name in a notification.

In detail, it adds a browser action. When the user clicks the browser action, the add-on:

This is following essentially the process documented here: https://developers.google.com/identity/protocols/OAuth2UserAgent.

Setup

There’s some basic setup you must do before you can use this example.

Note that because you have to edit authorize.js, we can’t provide a prebuilt, presigned version of this add-on in the “builds” directory of this repo, as we can for other examples. So to run this example in Firefox you’ll need to use the “Load Temporary Add-on” feature, or use the web-ext tool.