KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to authorize my application to integrate with Google Drive. Google documentation provides details for server based authorization and code samples for various server technologies . There's also a JavaScript Google API library , that has support for authorization. Down in the samples section of the wiki there is a code snippet for creating a config and calling the authorize function . I've altered the scope to be that one I believe is required for drive: var config = { 'client_id': 'my_client_ID', 'scope': 'https://www.googleapis.com/auth/drive.file' }; gapi.auth.authorize(config, function() { console.log(gapi.auth); }); The callback function is never called (yes, the Google API library is loaded corrected) Looking the Java Retrieve and Use OAuth 2.0 Credentials example, the client secret seems to be a parameter, should this go into the config? Has anyone tried this in JS, for Drive or other Google APIs? Does anyone know the best route for debugging such a problem, i.e. do I need to just step through the library and stop whinging? Please don't suggest doing the authorization on the server side, our application is entirely client side, I don't want any state on the server (and I understand the token refresh issues this will cause). I am familiar with the API configuration in the Google console and I believe that and the drive SDK setting are correct.
Tags (comma-separated)
Save Edits
Cancel