Skip to content

Add LinkedIn login

You can add LinkedIn login to your applications using Asgardeo and enable users to log in with their LinkedIn accounts.

Follow this guide for instructions.

Register Asgardeo on LinkedIn

You need to register Asgardeo as an OAuth2.0 application on LinkedIn.

  1. Go to the LinkedIn Developer console, click on Create app button to create a new application.

    Create a new application

  2. Provide the App name, LinkedIn Page, and App logo for your application. Accept the Legal agreement and click on Create app to complete the application creation process.

    Application create wizard

  3. In the Products tab, request access for Sign In with LinkedIn using OpenID Connect.

    Request access for sign in with LinkedIn using OpenID Connect

  4. Navigate to the Auth tab and add the following URL as the Authorized Redirect URL for your app.

    https://api.asgardeo.io/t/{organization_name}/commonauth
    

    Authorized Redirect URL

  5. Take note of the client ID and client secret generated for the application from the Auth tab.

Register the LinkedIn IdP

Now, let's register the LinkedIn IdP in Asgardeo.

  1. On the Asgardeo Console, go to Connections.
  2. Click New Connections and select LinkedIn.
  3. Enter the following details of the LinkedIn identity provider and click Create:

    Add LinkedIn IDP in Asgardeo

    Parameter Description
    Name A unique name for this LinkedIn identity provider.
    Client ID The client ID obtained from LinkedIn.
    Client secret The client secret obtained from LinkedIn.

Enable LinkedIn login

Before you begin

You need to register an application with Asgardeo. You can register your own application or use one of the sample applications provided.

  1. On the Asgardeo Console, go to Applications.
  2. Select your application, go to the Login Flow tab and add LinkedIn login from your preferred editor:

    To add LinkedIn login using the Classic Editor:

    1. If you haven't already defined a sign-in flow, click Start with Default configuration to get started.

    2. Click Add Authentication on the step, select your LinkedIn identity provider, and click Add.

      Add LinkedIn login in Asgardeo

    To add LinkedIn login using the Visual Editor:

    1. Switch to the Visual Editor tab, by default the Username & Password login flow will be added onto the Visual Editor's workspace.

    2. Click on + Add Sign In Option to add a new authenticator to the same step and select your LinkedIn connection.

      add LinkedIn login in Asgardeo using the Visual Editor


    Recommendations

    It is recommended to add your social and enterprise connections to the first authentication step as they are used for identifying the user.

  3. Click Update to save your changes.

Try it out

Follow the steps given below.

  1. Access the application URL.
  2. Click Login to open the Asgardeo login page.
  3. On the Asgardeo login page, Sign in with LinkedIn.

    Login with LinkedIn

  4. Log in to LinkedIn with an existing user account.

Note

When a user successfully logs in with LinkedIn for the first time, a user account is created in the Asgardeo Console with the LinkedIn email. This new user account will be managed by LinkedIn.

Configure connection

To learn more about other configurations available for the connection, refer to the add federated login documentation.