mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 10:45:12 +00:00
# Which Problems Are Solved Both the login UI and the IdP intent flow have their own IdP callback endpoints. This makes configuration hard to impossible (e.g. Github only allows one endpoint) for customers. # How the Problems Are Solved - The login UI prefixes the `state` parameter when creating an auth / SAML request. - All requests now use the `/idp/callback` or the corresponding variation (e.g. SAML) - On callback, the state, resp. its prefix is checked. In case of the login UI prefix, the request will be forwarded to the existing login UI handler without the prefix state. Existing setups will therefore not be affected and also requests started before this release can be handled without any impact. - Console only lists the "new" endpoint(s). Any `/login/externalidp/callback` is removed. # Additional Changes - Cleaned up some images from the IdP documentation. - fix the error handling in `handleExternalNotFoundOptionCheck` # Additional Context - closes #8236
82 lines
2.7 KiB
Plaintext
82 lines
2.7 KiB
Plaintext
---
|
|
title: Configure LinkedIn as an OAuth Identity Provider in ZITADEL
|
|
sidebar_label: LinkedIn generic OAuth
|
|
id: linkedin-oauth
|
|
---
|
|
|
|
import GeneralConfigDescription from './_general_config_description.mdx';
|
|
import Intro from './_intro.mdx';
|
|
import CustomLoginPolicy from './_custom_login_policy.mdx';
|
|
import IDPsOverview from './_idps_overview.mdx';
|
|
import GenericOAuth from './_generic_oauth.mdx';
|
|
import Activate from './_activate.mdx';
|
|
import PrefillAction from './_prefill_action.mdx';
|
|
import TestSetup from './_test_setup.mdx';
|
|
|
|
<Intro provider="LinkedIn"/>
|
|
|
|
## LinkedIn Configuration
|
|
|
|
### Register a new client
|
|
|
|
1. Go to the LinkedIn Developer console and create a new App: https://www.linkedin.com/developers/apps/new
|
|
2. Add your App Name, your Company Page and a Logo
|
|
3. Add "Sign In with LinkedIn using OpenID Connect" by clicking "Request access"
|
|
4. Go to the Auth Settings of the App and add the following URL to the "Authorized redirect URLs"
|
|
- `{your_domain}/idps/callback`
|
|
- Example redirect url for the domain `https://acme.zitadel.cloud` would look like this: `https://acme.zitadel.cloud/idps/callback`
|
|
5. Verify the app as your company
|
|
6. In the Auth - OAuth 2.0 scopes section you should see `openid`, `profile` and `email` listed
|
|
7. Save Client ID and Primary Client Secret from the Application credentials
|
|
|
|

|
|
|
|
## ZITADEL Configuration
|
|
|
|
### Add custom login policy
|
|
|
|
<CustomLoginPolicy/>
|
|
|
|
### Go to the IdP Providers Overview
|
|
|
|
<IDPsOverview templates="Generic OAuth"/>
|
|
|
|
### Create a new Generic OAuth Provider
|
|
|
|
<GenericOAuth
|
|
name=": e.g. LinkedIn"
|
|
authendpoint="https://www.linkedin.com/oauth/v2/authorization"
|
|
tokenendpoint="https://www.linkedin.com/oauth/v2/accessToken"
|
|
userendpoint="https://api.linkedin.com/v2/userinfo"
|
|
id="sub"
|
|
clientid=": Client id from the application previously created in your LinkedIn account"
|
|
clientsecret=": Client Secret from the application previously created in your LinkedIn account"
|
|
/>
|
|
|
|
|
|
<GeneralConfigDescription provider_account="LinkedIn account" />
|
|
|
|

|
|
|
|
### Activate IdP
|
|
|
|
<Activate/>
|
|
|
|

|
|
|
|
## Test the setup
|
|
|
|
<TestSetup loginscreen="your LinkedIn login"/>
|
|
|
|

|
|
|
|

|
|
|
|
## Optional: Add ZITADEL action to autofill userdata
|
|
|
|
<PrefillAction fields="firstname, lastname, username, email and email verified" provider="LinkedIn"/>
|
|
|
|
```js reference
|
|
https://github.com/zitadel/actions/blob/main/examples/linkedin_identity_provider.js
|
|
```
|