{"action":"created","issue":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/880","labels_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/880/comments","events_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/880/events","html_url":"https://github.com/remotestorage/remotestorage.js/pull/880","id":99421066,"number":880,"title":"Added an oauth flow for cordova using InAppBrowser","user":{"login":"lewisl9029","id":6934200,"avatar_url":"https://avatars.githubusercontent.com/u/6934200?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisl9029","html_url":"https://github.com/lewisl9029","followers_url":"https://api.github.com/users/lewisl9029/followers","following_url":"https://api.github.com/users/lewisl9029/following{/other_user}","gists_url":"https://api.github.com/users/lewisl9029/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisl9029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisl9029/subscriptions","organizations_url":"https://api.github.com/users/lewisl9029/orgs","repos_url":"https://api.github.com/users/lewisl9029/repos","events_url":"https://api.github.com/users/lewisl9029/events{/privacy}","received_events_url":"https://api.github.com/users/lewisl9029/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-08-06T12:05:23Z","updated_at":"2015-08-07T10:56:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/pulls/880","html_url":"https://github.com/remotestorage/remotestorage.js/pull/880","diff_url":"https://github.com/remotestorage/remotestorage.js/pull/880.diff","patch_url":"https://github.com/remotestorage/remotestorage.js/pull/880.patch"},"body":"Here's a quick change I made to get remoteStorage to play well with Cordova. \r\n\r\nIt's working for my app but I may be missing some corner cases. \r\n\r\nNo new tests are failing as far as I can tell (there were some console errors when I ran the tests, both before and after my changes, but the summary says 0 failures). Let me know if you want to see any new tests written for this.\r\n\r\nI referred heavily to the Dropbox Oauth implementation in ng-cordova-oauth:\r\n\r\nhttps://github.com/nraboy/ng-cordova-oauth/blob/master/src/oauth.js\r\n\r\nI made a small modification to reuse the existing extractParams function, and changed the redirectUri and clientId to be compatible with Cordova. \r\n\r\nI'm not sure what we can use for clientId in Cordova though. Nothing seems to be distinctive enough in window.location under Cordova (I've included a snapshot of what window.location looks like in my cordova app). Would it be a good idea to ask app developers for a clientId as an input for their app instead of generating it?"},"comment":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/comments/128672268","html_url":"https://github.com/remotestorage/remotestorage.js/pull/880#issuecomment-128672268","issue_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/880","id":128672268,"user":{"login":"skddc","id":842,"avatar_url":"https://avatars.githubusercontent.com/u/842?v=3","gravatar_id":"","url":"https://api.github.com/users/skddc","html_url":"https://github.com/skddc","followers_url":"https://api.github.com/users/skddc/followers","following_url":"https://api.github.com/users/skddc/following{/other_user}","gists_url":"https://api.github.com/users/skddc/gists{/gist_id}","starred_url":"https://api.github.com/users/skddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skddc/subscriptions","organizations_url":"https://api.github.com/users/skddc/orgs","repos_url":"https://api.github.com/users/skddc/repos","events_url":"https://api.github.com/users/skddc/events{/privacy}","received_events_url":"https://api.github.com/users/skddc/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T10:56:39Z","updated_at":"2015-08-07T10:56:39Z","body":"I think we should solve the whole Cordova flow with this one. I'll gladly help."}}