# Register Codex in Okta

Register Codex as an app in Okta so it can sign people in to your Dtwo gateway.

## Overview

Codex needs its own app in Okta to sign people in to your Dtwo gateway. You only do this once for your organization. Everyone who uses Codex with your gateway signs in through this app.

## Before you start

If you haven't set up your Dtwo gateway in Okta yet, follow [Configure Okta](/docs/identity-provider-okta) first, then come back here.

## Register Codex

1. Go to **Applications and Resources → Applications** and select **Create App Integration**.
2. Set **Sign-in method** to **OIDC - OpenID Connect** and **Application type** to **Single-Page Application**, then select **Next**.
3. Fill in the app settings:
   - **App integration name**: `Codex`
   - **Client definition**: **Use Okta-generated client ID**
   - **Grant type**: **Authorization Code** and **Refresh Token**
   - **Sign-in redirect URIs**: `http://127.0.0.1:33419/callback`
   - **Controlled access**: assign the users or groups who may use the gateway through this client
4. Select **Save**, then copy the **Client ID** from the **General** tab — this is the client's `<ClientId>`.

## Next steps

Use the client ID you copied to [roll out Dtwo to your organization in Codex](/docs/connect-client-codex) or to [connect Codex for yourself](/docs/connect-yourself-codex).

---

Having trouble? Email [support@dtwo.ai](mailto:support@dtwo.ai).