When a user clicks the sign in button, a pop-up window containing the LinkedIn authentication dialog will be presented. Once the user has accepted the request and provided their LinkedIn account credentials, the window will be dismissed and the SDK will perform the back-end call to LinkedIn to silently complete the authentication process for you. Since this request happens asynchronously, you must define a function that will listen for an auth event to be thrown so that you know that the authentication process has completed and that it is safe for your application to make further API calls.
Use the onLoad argument in the SDK's <script> block when you initialize the SDK to choose a function to execute once the SDK has finished loading. This function should then setup the auth event listener, as shown below. Once an auth event is thrown, it's safe to use the SDK's generic API call wrapper, IN.API.Raw(), to make a rest API call to fetch the member's basic profile data, completing the Sign In with LinkedIn process.
Set the authorize argument in the SDK's <script> initialization block to true to use the user's existing LinkedIn session, if available. By default, the value is false and your users will be presented with the Sign In with Linked In button on every page load.