Here's some documentation on the oauth2 stuff
https://developer.chrome.com/extensions/app_identity