title: LinkedIn OAuth2 Authorization server encountered an unexpected condition
body: <p>We're getting this weird error for some of our users who are trying to authenticate via linked in OAuth2 API from mobile within a webview.</p>
  
  <pre><code>https://www.linkedin.com/uas/oauth2/authorization?response_type=code&amp;client_id=XXX&amp;state=XXX&amp;redirect_uri=XXX&amp;scope=r_emailaddress%20r_basicprofile
  </code></pre>
  
  <p>After the submit ( <a href="https://www.linkedin.com/uas/oauth2/authorizedialog/submit">https://www.linkedin.com/uas/oauth2/authorizedialog/submit</a> ), there is a redirect to our redirect uri with the following params.</p>
  
  <pre><code>?error=server_error&amp;error_description=XXX&amp;state=the+authorization+server+encountered+an+unexpected+condition
  </code></pre>
  
  <p>I went through this => <a href="http://chriskief.com/2014/04/23/linkedin-api-unable-to-retrieve-access-token/">http://chriskief.com/2014/04/23/linkedin-api-unable-to-retrieve-access-token/</a> . </p>
  
  <p>Creating a new application or generating fresh keys is a problem as it would break the linked in login for already installed apps. We have never use OAuth1 before.</p>