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

# Okta

> Integrate OwnID password free authentication into your Okta flow

By integrating Okta with OwnID, you can implement the full set of OwnID features to simplify and streamline your user login experience.

## How it Works

OwnID supports integration with Okta through our pre-built Okta Connector.

Configuration on the Okta side happens through your Okta Admin Dashboard. Ensure you have an account with admin access in Okta.

Complete these five basic steps to integrate OwnID with Okta:

**Step 1** - Extend Okta User Schema.

**Step 2** - Create Okta API Token.

**Step 3** - Create the OwnID App.

**Step 4** - Create an Identity Provider.

**Step 5** - Frontend Integration.

## Step 1 - Extend Okta User Schema

Add an attribute in Okta called `ownIdData`. This is used to store user authentication data *in Okta*.

1. In your Okta Admin Dashboard go to *Directory -> Profile Editor*.

2. Select the User (default) user group. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_3_profile_editor.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=866ceb689509f6613035c17c6c2d0110" width="400" alt="User view in Okta Profile editor" data-path="images/okta/okta_3_profile_editor.png" />
   <sup>Figure 1. Profile editor</sup>

3. Click **+Add Attribute**. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_4_add_attr.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=c63e9596683b423420a2193e16b25919" width="400" alt="Add attribute in the User view in Okta Profile editor" data-path="images/okta/okta_4_add_attr.png" />
   <sup>Figure 2. Add attribute</sup>

4. Complete the attribute configuration as shown below. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_5_attr.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=f5c2c5fb46e3ee0a3e9bc339db5f2830" width="400" alt="Attribute configuration in the User view in Okta Profile editor" data-path="images/okta/okta_5_attr.png" />
   <sup>Figure 3. Attribute configuration</sup>

5. Click **Save**.

<Info>
  **Securing User's Personal Data**

  OwnID does not store or process any user data. Users' public keys and device information are stored on your platform.

  Private keys are kept exclusively on the user's device and are never transmitted elsewhere.
</Info>

## Step 2 - Create Okta API Token

1. In your Okta Admin Dashboard, go to: *Security -> API -> Tokens* tab.

2. Click **Create Token**. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_1_create_token.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=875ffff88a17b2342f3d4122bf107b26" width="400" alt="Okta Admin Dashboard with Create token button" data-path="images/okta/okta_1_create_token.png" />
   <sup>Figure 4. Create API token</sup>

3. Fill in the token name - "OwnID API Token".

4. Copy the token value. We will use it in the next step. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_2_token_copy.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=40a3bcaa893ef2edf5b2a135263713b5" width="400" alt="Pop up indicating token created successfully with actual token embedded" data-path="images/okta/okta_2_token_copy.png" />
   <sup>Figure 5. Copy API token</sup>

5. Click **OK, got it** after copying the token.

## Step 3 - Create the OwnID App

We'll create a new OwnID app using the Okta Connector.

<img src="https://mintcdn.com/ownid/FZ6hme-wnXgWbl15/images/oi-tile-okt.png?fit=max&auto=format&n=FZ6hme-wnXgWbl15&q=85&s=d19e3fb01d5aee7a3514a361fbc57f7a" width="200" alt="Okta Connector tile in OwnID Console" data-path="images/oi-tile-okt.png" />

An OwnID App is what connects the existing identity provider used by your website with the OwnID widget you insert on the front end.

<img src="https://mintcdn.com/ownid/FZ6hme-wnXgWbl15/images/oi-widg-s.png?fit=max&auto=format&n=FZ6hme-wnXgWbl15&q=85&s=bf7a9470aa987db7e13fa9eabb6343aa" width="200" alt="OwnID Widget" data-path="images/oi-widg-s.png" />

<sup> OwnID widget </sup>

Each of your OwnID Apps acts as the central point of configuration for each of your integrations. These no-code Apps are created, hosted, and maintained entirely within the OwnID Console environment.
When you create an App, it's assigned a unique `appId` automatically. Use that `appId` in OwnID SDK interaction from your website’s front end.

#### To Create an OwnID App

1. Login to the [OwnID Console](https://console.ownid.com) (or create your account).

2. Click **+Create Application** from the Apps screen.

3. Enter a name for your application in the *App name* field.

4. From the *Choose your integration* panel, select the *Okta* tile. <img src="https://mintcdn.com/ownid/FZ6hme-wnXgWbl15/images/oi-integ-tiles.png?fit=max&auto=format&n=FZ6hme-wnXgWbl15&q=85&s=5bf0883b7b5a978e8d6cebd790538e47" width="400" alt="Profile editor" data-path="images/oi-integ-tiles.png" />

5. Click **Next**.

6. Click **Explore my App** on the "Congratulations" popup. <img src="https://mintcdn.com/ownid/FZ6hme-wnXgWbl15/images/oi_app_ready.png?fit=max&auto=format&n=FZ6hme-wnXgWbl15&q=85&s=aeaaeef9f684aa99d048009c631e5e39" width="400" alt="Profile editor" data-path="images/oi_app_ready.png" />

#### Set Okta Integration Parameters

In your Okta integration page, fill in the following information:

1. In *Okta Settings*, set the **Site Domain** - *e.g: [https://acme.okta.com](https://acme.okta.com)*

2. In *Okta Settings*, set the **API Token** value you created above.

3. In *Okta Settings*, skip the **Identity Provider ID** for now. We will get this in a later step. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_5_settings.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=acf796a8cca3caea0253bb3860a98b14" width="600" alt="Okta settings" data-path="images/okta/okta_5_settings.png" />

4. In *OpenID Connect settings*, set **Redirect URIs** by adding one or more Okta redirect URIs, typically in the format `https://your-auth-domain.com/oauth2/v1/authorize/callback`. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_5_oidc.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=ef61382cbcd2df5271e69afec72224be" width="600" alt="Oidc settings" data-path="images/okta/okta_5_oidc.png" />

5. Click **Save Changes**.

The other values in this page will be used in the next step.

## Step 4 - Create an Identity Provider

Create an OwnID OIDC Identity Provider.

1. In your Okta Admin Dashboard, go to *Security -> Identity providers*.

2. Click **Add identity provider**. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_6_add_idp.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=813bac8d531ab26edd0e03c5a5844942" width="250" alt="Add identity provider button in Okta Admin Dashboard" data-path="images/okta/okta_6_add_idp.png" />
   <sup>Figure 6. Add identity provider</sup>

3. From the provider options, select the *OpenID Connect IdP* tile. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_7_select_idp.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=00f601133571ecbf1190a64d180474c9" width="400" alt="OpenID Connect IdP shown as selected option in grid of identity providers" data-path="images/okta/okta_7_select_idp.png" />
   <sup>Figure 7. OpenID Connect IdP</sup>

4. The *General settings* form opens. Configure it with the following general settings: <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_8_gen_settings.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=84496b217c8ddb281974e898b8bedae6" width="400" alt="IdP settings form for OpenID" data-path="images/okta/okta_8_gen_settings.png" />
   <sup>Figure 8. IdP settings</sup>

5. For the *Client details* values use the `Client ID` and `Client Secret` from the OwnID application created in the previous step as shown. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_9_client_settings.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=c322152a51bdb8ad3048d701c99ff8c8" width="400" alt="Client details form for client ID and secret" data-path="images/okta/okta_9_client_settings.png" />
   <sup>Figure 9. Client details</sup>

6. **In *Endpoints*, enter the values from the OwnID application created in the previous step?**

7. Set the remaining details as shown below: <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_10_auth_settings.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=a6e8c27f0e6265eda8b5cc532e43e4e8" width="400" alt="Authentication settings form in Okta" data-path="images/okta/okta_10_auth_settings.png" />
   <sup>Figure 10. Authentication settings</sup>

8. Click **Save**.

Be sure to copy the `IdP ID` value from the *Summary*\_ so we can use it in the next step. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_11_idp_summary.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=ef0d17f51f2c80cd6ab84066de19750e" width="400" alt="IdP Summary screen showing IdP ID and the authorize and redirect URLs" data-path="images/okta/okta_11_idp_summary.png" />
<sup>Figure 11. IdP Summary</sup>

## Step 5 - Frontend Integration

1. In your Okta Admin Dashboard, go to *Customizations -> Brands*.

2. Select your relevant brand.

3. Click **Customize** on the *Sign-in page* panel. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_12_brand.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=2c8f86bf54cce485c6baea03b0422303" width="400" alt="Brand customization in Okta Admin Dashboard" data-path="images/okta/okta_12_brand.png" />
   <sup>Figure 12. Brand customization in Okta</sup>

4. Ensure the **Code Editor** option is toggled *on* (requires a custom domain). <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_13_code_editor.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=8d0fa6224e529ecb4ac28e72d05f8943" width="250" alt="Code editor toggle on page design tab of Okta Sign-in configuration page" data-path="images/okta/okta_13_code_editor.png" />
   <sup>Figure 13. Code editor</sup>

5. Under the `<body>` tag, locate the `{{{OktaUtil}}}` definition, then add the OwnID script for loading the OwnID WebSDK below the `OktaUtil` line. <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_15_code_placement.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=24fd2c546426898ce05b7c11d0555fad" width="400" alt="Code placement" data-path="images/okta/okta_15_code_placement.png" />

   The script could be fetched from the integration settings of the app in the OwnID Console. Once you fill in the *Identity Provider ID* created in the previous step, you will have a full snippet ready to copy.

   <img src="https://mintcdn.com/ownid/I82uk9jjVUEg_6q6/images/okta/okta_14_snippet.png?fit=max&auto=format&n=I82uk9jjVUEg_6q6&q=85&s=0f89e79232f5ef53c2acc02d47db698f" width="600" alt="Snippet" data-path="images/okta/okta_14_snippet.png" />

   Alternatively, you can use the following snippet and fill in the placeholders:

   * Replace `<appId>` with the `appId` from the OwnID application created in step 3.

   * Replace `<idpId>` with the `IdP ID` from step 4.

```javascript Web SDK Configuration theme={null}
((o, w, n, i, d) => {
    o[i] = o[i] || (async (...a) => ((o[i].q = o[i].q || []).push(a), { error: null, data: null })),
        (e = w.createElement("script")).src = 'https://cdn.ownid.com/sdk/' + n, e.async = 1, w.head.appendChild(e);
        new OktaSignIn(OktaUtil.getSignInWidgetConfig()).on('afterRender', c => ownid("oktaRender", {idpId: d, context: c}))
})
(window, document, '<appId>', 'ownid', '<idpId>');
```

6. Click **Save and Publish**.

<Check>**Congratulations!**\
Enjoy your Okta-integrated passwordless authentication!</Check>

## Next Steps

### Ready to deploy?

<Card title="YES!" href="/building-blocks/pre-deployment-checklist" icon="rocket-launch">
  Take me to the Deployment Checklist
</Card>
