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 share content with LinkedIn on the member's behalf.
You can find additional details about what the POST payloads for sharing content look like on in the REST API documentation section of Share with LinkedIn.