Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Extension - Javascript Origins for Google API

I'm trying to make my Chrome extension upload files to Google Drive, but I'm stuck on authorization. I've been working off the code and instructions from here, but I don't know what to set for the "Authorized JavaScript Origins" in the developer console.

When I attempt to authorize, the origin is "chrome-extension://[extension id]", but this is not allowed as an authorized origin in the console.

What origin can I use?

like image 259
Josh Wight Avatar asked Jan 16 '15 18:01

Josh Wight


1 Answers

You don't have to worry about the origin part in Chrome Extension, you simply need to generate a client id specific to the Chrome Extension, and use the Chrome Identity API to get authorization from the user.

like image 104
Dayton Wang Avatar answered Sep 28 '22 04:09

Dayton Wang