Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Yup. What you can do is register a custom URI scheme with your application and use it in the oauth_callback parameter. This saves you from having to use out-of-band callback configuration, which requires the user to manually enter a verifier, as you describe. </p> <p>Details on registering a custom URI scheme for your app here:</p> <p><a href="http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html" rel="nofollow noreferrer">http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html</a></p> <p><strong>Edited - Elaborating</strong></p> <p>Using a custom URI scheme, you can instruct an OAuth Service Provider to 'call back' to your iPhone application when a user authorizes a Request Token. This is an alternative to the cumbersome "out-of-band callback" workflow that requires a user to authorize a Request Token, and then be given a verifier code that they manually enter via your application. It is also more analogous to how Web Applications that use OAuth behave. </p> <p>The steps involved in using a URI scheme would be the following:</p> <ol> <li>Using the above link as a guide, bind a custom URI scheme to your iPhone application (i.e. "myapp://"). </li> <li>When requesting a Request Token from the OAuth Service Provider, provide a URI that uses your custom scheme as the value of the 'oauth_callback' parameter. For example, oauth_callback=myapp://oauth/callback</li> <li>When you get a Request Token, direct the user to the Service Providers authorization endpoint URL via the browser (launch Safari, send the user to <a href="http://example.com/oauth/authorize?oauth_token=token" rel="nofollow noreferrer">http://example.com/oauth/authorize?oauth_token=token</a>). </li> <li>If the user chooses to authorize the Request Token, the Service Provider will redirect them (usually via a 301 HTTP Status header) to the URI you provided in step # 2. </li> <li>Safari will recognize that the URI uses a scheme that is bound to your application and launch your app. </li> <li>When the callback is called (again, see the above linked guide for details) you will be able to exchange the authorized OAuth Request Token for an Access Token. </li> <li>Finally, with an Access Token you will be able to access Protected Resources from the OAuth Service Provider. </li> </ol> <p>Does that make more sense? </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