Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Updated 19/03/2013</p> <p>If server is a must have middle man, then I recon the easiest way is to grab a domain name and make the server go public. www.godaddy.com or any domain name provider will get a domain name for about $15 per year (would be lower if there is discount). </p> <p>After that then just search how to get a dynamic DNS and setup the redirect_uri as the domain name that has been choose.</p> <p>Otherwise I didn't see the role of the server is playing here if only for the oauth purpose. As the second method listed below, a device can communicate to google server directly even behind a heavily defenced fire wall. (token will be passed throw the title bar). </p> <p>So might need some clairification here. </p> <p>Would the localhost server acting like a hub to cashing files from google drive and then redistribute to iOS devices? Or what kind of network architecture would like to achieve here?</p> <p>==</p> <p>Updated 18/03/2013</p> <p>according to the official document <a href="https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi" rel="nofollow">https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi</a></p> <p>There are two ways of oauth. using localhost as redirect is just one way.</p> <p>another is to use this string</p> <pre><code>urn:ietf:wg:oauth:2.0:oob </code></pre> <p>to replace the request where it have local host. </p> <p>For example, a previous request with localhost of (note: the difference is on the middle line starting with 'redirect_uri=')</p> <pre><code> https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&amp; redirect_uri=http://localhost:9004&amp; response_type=code&amp;client_id=812741506391-h38jh0j4fv0ce1krdkiq0hfvt6n5amrf.apps.googleusercontent.com </code></pre> <p>now can be changed to</p> <pre><code> https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&amp; redirect_uri=urn:ietf:wg:oauth:2.0:oob&amp; response_type=code&amp;client_id=812741506391-h38jh0j4fv0ce1krdkiq0hfvt6n5amrf.apps.googleusercontent.com </code></pre> <p>so access the url of the former one in the simulator should be equivalent of accessing the latter one in real device.</p> <p>Halo</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload