> ## Documentation Index
> Fetch the complete documentation index at: https://wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Okta

> Setting up SSO with Okta

### Steps to set Okta as an OIDC identity provider

<Steps>
  <Step>
    Navigate to the Applications view within your Okta Administrator Dashboard.
  </Step>

  <Step>
    Click on **Create App Integration**.
  </Step>

  <Step>
    A dialog appears, select **OIDC - OpenID Connect** as the sign-in method.
  </Step>

  <Step>
    For the application type, select **Web Application** and click on **Next**.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/create-app-integration.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=802e0ba2ba0aeae4c8c603877b964f13" width="2422" height="1960" data-path="images/studio/sso/create-app-integration.png" />
    </Frame>
  </Step>

  <Step>
    Now give the app a name.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/integration-name.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=a47702691f622aba877d8bfc5dffee3c" width="2438" height="1028" data-path="images/studio/sso/integration-name.png" />
    </Frame>
  </Step>

  <Step>
    For **Grant Type,** keep the defaults.
  </Step>

  <Step>
    Scroll down to the **Assignments** section and select one of the options based on your choice and then click on **Save.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/integration-assignments.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=1f7c7df437cafc75762fda571dffaa04" width="2356" height="652" data-path="images/studio/sso/integration-assignments.png" />
    </Frame>
  </Step>

  <Step>
    Copy the **Client ID** and **Client Secret.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/copy-client-credentials.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=37c808b742aef2e7e51673aeed3d2f9f" width="1704" height="1958" data-path="images/studio/sso/copy-client-credentials.png" />
    </Frame>
  </Step>

  <Step>
    Navigate to **Security** -> **API**.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/api-menu.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=c45afc45b119165b433b18f170fda505" width="2658" height="2052" data-path="images/studio/sso/api-menu.png" />
    </Frame>
  </Step>

  <Step>
    Select the **default** authorization server.
  </Step>

  <Step>
    Copy the **Metadata URI.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/metadata-uri.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=be300f11bc63ff7bc732fa6583511831" width="2218" height="1342" data-path="images/studio/sso/metadata-uri.png" />
    </Frame>
  </Step>

  <Step>
    Navigate to the settings page on Cosmo.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/connect_oidc.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=a63e1ded8ec97a6b332920dd52cdcd55" width="2796" height="1902" data-path="images/studio/sso/connect_oidc.png" />
    </Frame>
  </Step>

  <Step>
    Give the connection a name, paste the **Metadata URI** copied before, into the  **Discovery Endpoint,**and paste the **Client ID** and  **Client secret**copied before into the **Client ID** and  **Client Secret fields respectively,**and then click on **Connect.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/connect-oidc-dialog.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=038f856d1791872245c1311acbe39fad" width="2786" height="2122" data-path="images/studio/sso/connect-oidc-dialog.png" />
    </Frame>
  </Step>

  <Step>
    Configure the mapping between the roles in Cosmo and the user groups in Okta. The field **Group in the provider** can be populated with the name of the group or a regex to match the user groups. Once all the mappers are configured, click on **Save**.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/map-oidc-groups.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=9181a935f5e9c73a71b6fdba4c6fecd8" width="2774" height="1972" data-path="images/studio/sso/map-oidc-groups.png" />
    </Frame>
  </Step>

  <Step>
    Copy the sign-in and sign-out redirect URIs displayed in the dialog.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/connect-oidc-success.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=7d2a36bf0f2d2be2c1d2bc3d16babe84" width="2784" height="1848" data-path="images/studio/sso/connect-oidc-success.png" />
    </Frame>
  </Step>

  <Step>
    Navigate back to the application created on Okta and populate the Sign-in and Sign-out redirect URIs with the above-copied values. Click on **Save**.

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/image-11.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=af5857a94a7d54a3b694b95734009d92" width="768" height="453" data-path="images/studio/sso/image-11.png" />
    </Frame>
  </Step>

  <Step>
    Navigate to Security-> API, and click on the **default** auth server. Navigate to the **claims** tab and then click on **Add Claim.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/add-claims-tab.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=e6e1fd50a34a5188cf52cd67dcec9131" width="2340" height="1496" data-path="images/studio/sso/add-claims-tab.png" />
    </Frame>
  </Step>

  <Step>
    Name the claim "ssoGroups", and include it in the **ID Token,** for the value type select **Groups,** and  for the filter select **Matches regex** and populate the field with  **".\*".**Click on **Create.**

    <Frame>
      <img src="https://mintcdn.com/wundergraphinc-ahmet-eng-8587-documentation-for-connect-cli/4bDdzZZwotgzjNTa/images/studio/sso/image-13.png?fit=max&auto=format&n=4bDdzZZwotgzjNTa&q=85&s=d659aa85e78b0c0ff6a81327a5e6a3b6" width="768" height="586" data-path="images/studio/sso/image-13.png" />
    </Frame>
  </Step>

  <Step>
    Now you can assign users/groups to the application, and those users will be able to log into Cosmo using the URL provided on setting up the provider.
  </Step>
</Steps>

<Info>
  Please make sure that the users added to the application have a username.
</Info>
