There are four primary ways to kick off the flow to sign-in with LinkedIn.


One option is to create a link that the user clicks in order to log in. The HREF for that link would be the Authorize URL that you created previously:

<a href="https://{yourOktaDomain}/oauth2/v1/authorize?idp=0oaaq9pjc2ujmFZexample&client_id=GkGw4K49N4UEE1example&response_type=id_token&response_mode=fragment&scope=openid&">Login With LinkedIn</a>

After clicking this link, the user will be prompted to sign in with the social provider. After they succeed they will be returned to the specified redirect_uri along with an ID Token in JWT format.

Custom Okta-hosted Sign-in Page

If you have configured an Custom Okta-hosted Sign-in Page, you can add a "Login with LinkedIn" button by adding the following code:

idps: [
  {type: 'LINKEDIN', id: '$Your_LinkedIn_IDP_ID_Here'}

Okta Sign-in Widget

Okta also offers an easily embeddable JavaScript widget that reproduces the look and behavior of the standard Okta sign-in page. Adding a "Login with LinkedIn" button is as simple as adding the following code to your configuration:

idps: [
  {type: 'LINKEDIN', id: '$Your_LinkedIn_IDP_ID_Here'}

You can find out more about it on GitHub. Implementing login with LinkedIn would use the Widget's OpenID Connect authentication flow.


If you don't want pre-built views, or need deeper levels of customization, then you can use the same AuthJS SDK that the Sign-in Widget is built with. For further information see the AuthJS GitHub repo. Implementing login with LinkedIn would use the SDK's OpenID Connect authentication flow.

Featured Guides