> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magic.link/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Social Login with Magic

> You can allow your users to sign up & log in to your web app with their LinkedIn account.

## Usage

### Prerequisites

* You will need a [LinkedIn](https://www.linkedin.com/) account
* You will need to have the [Magic SDK installed](/embedded-wallets/sdk/overview) into your web app
* You will need to have the [Magic SDK - OAuth Extension](/embedded-wallets/authentication/login/oauth/oauth-implementation) installed into your web app

### LinkedIn Setup (v1 extension)

After installing the OAuth extension, you can now enable LinkedIn Login for your Magic app:

1. Follow LinkedIn's instructions to [create an app](https://www.linkedin.com/developers/apps/new)
2. Go to your [Magic Dashboard](https://dashboard.magic.link/login)
3. Select the Magic app for which you’d like to enable LinkedIn Login, or create a new app
4. Navigate to **Social Login** from the sidebar
5. Click the toggle for **LinkedIn**
6. Copy the **Redirect URI** field from your Magic Dashboard
7. Return to your LinkedIn App Dashboard and select **"Sign in with LinkedIn"** in the **"Products"** tab
8. Select **Auth** tab, add the **Redirect URI** you obtained from your Magic Dashboard into the **"Authorized redirect URLs for your app"** field
9. Click **"Update"** to save
10. Obtain the **"Client ID"** and **"Client Secret"**

<Frame>
  <img src="https://mintcdn.com/magic-newton/mA7B4icGsHcK07ZQ/images/obtain-client-credentials.webp?fit=max&auto=format&n=mA7B4icGsHcK07ZQ&q=85&s=deffc9a03ea1c305cc2952a1a59a3ec9" alt="" width="1200" height="654" data-path="images/obtain-client-credentials.webp" />
</Frame>

11. Return to your Magic Dashboard and input the **Client ID** and **Client Secret** for your LinkedIn OAuth app
12. In Magic Dashboard, click **“Save”** – Done!

### LinkedIn Setup (v2 extension)

* Follow above steps, but disregard Magic's **Redirect URI** in step 6
* In step 8, paste the **Redirect URI** you are passing in as the **redirectURI** argument to the **loginWithRedirect** method

```javascript JavaScript icon="square-js" theme={null}
await magic.oauth2.loginWithRedirect({
  provider: 'linkedin',
  redirectURI: 'https://your-app.com/your/oauth/callback', // <== whitelist this with LinkedIn
});
```

## Resources

* [LinkedIn Social Login Demo](https://magic-oauth-v2-dun.vercel.app)
