title: How to authenticate using the installed Twitter app
body: <p>If the user is logged-in with the native Twitter app installed, I want my app to open the Twitter app to request authorization.</p>
  <p>I already implemented the flow to get the <code>oauth_token</code> in order to start the login process through Twitter's api. Only, the current API Documentation do not mention anything about how to use the native iOS app in the process. It only sends back a url for the user to log in.</p>
  <pre><code>let url = URL(string: &quot;https://api.twitter.com/oauth/authorize?oauth_token=\(result.oauthToken)&quot;)!
              
  DispatchQueue.main.async {
     UIApplication.shared.open(url)
  }
  </code></pre>
  <p>On getting the requested <code>oauth_token</code>, I get this link. Opening the link will display a <code>Webview</code> to login. Not the native Twitter iOS app.</p>
  <p>I tried to use a deeplink to manually launch the Twitter app, but I couldn't found any resources on how to setup the link properly.</p>
  <p>So far I have tried things like:</p>
  <pre><code>twitterauth://authorize?consumer_key=[KEY]&amp;consumer_secret=[SECRET]&amp;oauth_callback=swifter-[KEY]
  </code></pre>
  <p>or</p>
  <pre><code>twitterauth://authorize?oauth_token=\(result.oauthToken)
  </code></pre>
  <p>without any success...</p>
  <p>As mentioned in another post, <strong>Clubhouse</strong> has implemented exactly this flow. So it is possible. The question is how ? </p>