I'm currently building an app in javascript for the new Firefox OS and am stuck on how to implement Google Drive API via OAuth v2. The app is probably on
http://localhost and urn:ietf:wg:oauth:2.0:oob
, therefore I have the setup Client ID for installed applications as well as Client ID for Drive SDK. Since it is in the app, I have embedded the browser(iframe) for OAuth wherein the user will grant the application access and the refresh_token will be saved by app and the user get redirected to app. There should be no popup and this should be contained within the app.
So how can I accomplish this/what is the best way of doing this as I don't have access to localhost and which method would be the best(e.g. jsclient, http request,...)?
This app is just client based(no server-side). Also another question, can the User enter its username and password in app that we sent to google for authorization?