title: How to add LinkedIn OAuth 2.0 authentication in iOS swift?
body: <p>I have implemented LinkedIn authentication with the Mobile SDK. But mobile SDK authentication is not working now. On LinkedIn's website, they have mentioned that "Our JavaScript and Mobile Software Development Kits (SDKs) will stop working. Developers will need to migrate to using OAuth 2.0 directly from their apps." </p>
  
  <p>But they have not given exact steps to implement OAuth 2.0 authentication.</p>
  
  <p>I have referred many websites and StackOverflow questions, but I didn't get exact steps to implement this as per the current issues of LinkedIn. </p>
  
  <p>All answers given on StackOverflow was old when LinkedIn don't have these much issues. I've asked the question on LinkedIn help forum too, but they suggested me to ask a question on StackOverflow.</p>
  
  <p>So can anyone suggest me the good tutorial or steps to implement OAuth 2.0? </p>
  
  <p>I've tried with below code:</p>
  
  <pre><code>linkedInHelper.login(from: self, loadingTitleString: "Loading", completion: { (token) in
                      let alertVC = UIAlertController(title: "Success", message: "Your access token is : \(token)!", preferredStyle: .alert)
                      alertVC.addAction(UIAlertAction(title: "Ok", style: .default, handler: { _ in
                          alertVC.dismiss(animated: true, completion: nil)
                      }))
                      self.present(alertVC, animated: true, completion: nil)
                  }, failure: { (error) in
                      print(error.localizedDescription)
                  }) {
                      print("Cancel")
                  } 
  </code></pre>
  
  <p>But still, it is not working. This gave me an error "bummer, something went wrong. the redirect_uri does not match the registered value". </p>
  
  <p>As per some tutorials, I've also tried with below code:</p>
  
  <pre><code>let linkedinCredentilas = [
      "linkedInKey": "",
      "linkedInSecret": "",
      "redirectURL": "myapp://"
  ]
  
  let linkedInConfig = LinkedInConfig(linkedInKey: linkedinCredentilas["linkedInKey"]!, linkedInSecret: linkedinCredentilas["linkedInSecret"]!, redirectURL: linkedinCredentilas["redirectURL"]!)
  </code></pre>
  
  <p>But I don't know that what should be the redirect URL.</p>
  
  <p>I simply want to redirect the user to my app after authentication. I don't want to redirect the user to any website. So, in this case, what should I mention as a redirect URL?</p>