title: How to create linkedin login in angular 9?
body: <p>I am try login in angular 9 using linked in but can't find any possible way do it.
  I have googled this  but I can't find any social login library for angular 9 which work for linkedin.
  All library using angular 6 or less version. 
  I have tried many social login library angular 9.</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
      // Setup an event listener to make an API call once auth is complete
      function onLinkedInLoad() {
          IN.Event.on(IN, "auth", getProfileData);
      }
  
      // Use the API call wrapper to request the member's profile data
      function getProfileData() {
          IN.API.Profile("me").fields("id", "first-name", "last-name", "headline", "location", "picture-url", "public-profile-url", "email-address").result(displayProfileData).error(onError);
      }
  
      // Handle the successful return from the API call
      function displayProfileData(data) {
          var user = data.values[0];
          document.getElementById("picture").innerHTML = '&lt;img src="'+user.pictureUrl+'" /&gt;';
          document.getElementById("name").innerHTML = user.firstName+' '+user.lastName;
          document.getElementById("intro").innerHTML = user.headline;
          document.getElementById("email").innerHTML = user.emailAddress;
          document.getElementById("location").innerHTML = user.location.name;
          document.getElementById("link").innerHTML = '&lt;a href="'+user.publicProfileUrl+'" target="_blank"&gt;Visit profile&lt;/a&gt;';
          document.getElementById('profileData').style.display = 'block';
      }
  
      // Handle an error response from the API call
      function onError(error) {
          console.log(error);
      }
  
      // Destroy the session of linkedin
      function logout(){
          IN.User.logout(removeProfileData);
      }
  
      // Remove profile data from page
      function removeProfileData(){
          document.getElementById('profileData').remove();
      }
  &lt;/script&gt;
  </code></pre>