You should be able to generate an iFrame here. This is basically a headless html page that your code gets executed on. 8 years ago Have you tried using an iFrame? I believe in firefox that you have access to a "background script". The Node version uses a form of dynamic module loading that appears to escape browserify, so I've given up on that. Oauth2Client.getToken(code, function(err, tokens) form a high level it looks like they only use the winodw obj to store global variables 8 years ago That's what I'm trying now. Var code = readlineSync.question('Auth code? :') Scope: SCOPE // If you only need one scope you can pass it as string Var oauth2Client = new 2(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL) Īccess_type: 'offline', // 'online' (default) or 'offline' (gets refresh_token) REDIRECT_URL = 'urn:ietf:wg:oauth:2.0:oob', Var readlineSync = require('readline-sync') Am I stuck using raw REST calls? The Node script that works looks like this: var google = require('googleapis') Extensions are coded in Javascript, but neither of the two existing javascript SDKs seem to fit the client-side SDK expects "window" to be available, which isn't the case in extensions, and the server-side SDK seems to rely on Node-specific facilities, as a script that works in node no longer does when I load it in chrome after running it through browserify. I'm trying to access (CRUD) Google Drive from a Firefox extension.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |