> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/integrations/identity-verification/epic-identity-verification-in-mychart-and-epiccare-link/setting-up-an-epic-oidc-client-in-1kosmos.md).

# Setting up an Epic OIDC Client in 1Kosmos

You must configure an OIDC Client to connect a third party application with 1Kosmos. You can configure this client for Epic and use it for both the MyChart and EpicCareLink applications.&#x20;

1. After reviewing all the information, click Create.&#x20;
2. Log in to your tenant as a Community Administrator.
3. Navigate to **Applications > Add Application** (or click **Add an application** from the Manage Applications page).
4. Scroll down and click **Add Integration** under the **OIDC** tile.
5. In the **Create new OIDC Integration** page, fill in the following:
   * **Application name** — Descriptive name, for example: `Epic Identity Verification`
   * **Application Type** — Web
   * **Grant Type** — Authorization Code
   * **Sign-In Redirect URI** — Sign-In Redirect URI – Provide the sign-in redirect URI for Epic. If you are using this for both MyChart and EpicCare Link, provide both sign-in redirect URIs
   * **Scopes** — The following scopes are required:
     * `profile` — Required for user profile claims (enabled by default)
     * `openid` — Required for OIDC authentication (enabled by default)
     * `identity_assurance` — **Required** — enables the identity verification flow
     * `idv_flow_{id}` — **Required** — specifies which workflow to trigger. Replace `{id}` with the workflow access code.
       * Example: if access code is `abc123`, scope is `idv_flow_abc123`
       * Example: if access code is `verify-user-2024`, scope is `idv_flow_verify-user-2024`
6. Configure the Claims Transformation Script (see below).
7. Click **Create**. A Client ID and Client Secret are automatically assigned.

#### Enabling and configuring the claims transformation script&#x20;

In the OIDC application configuration, navigate to Claims Transformation. This field permits custom JSON that determines what claims need to be returned back to Epic. &#x20;

This section needs to return the claims you collected from the identity verification process. The JSON below will return these claims: “firstname”, “lastname”, “ssn”, & “birthdate”. These claims need to be collected in your workflow to be returned.&#x20;

```
 
function mapClaims({ user = {}, ialData = {}, userDocuments = [], mapping = [], workflowSummary = null, errorContext = null }) {
const claims = {};  
 if (workflowSummary || errorContext) { 
const personInfo = workflowSummary?.summary?.person_info || {}; 
    claims.firstname = personInfo.firstName || null; 
    claims.lastname = personInfo.lastName || null; 
   claims.ssn= personInfo.ssn|| null; 
    claims.birthdate = personInfo.dob || null; 
  } 
  return claims; 
}  
```

The script editor provides a **Run** feature that allows you to check your script for errors before saving.&#x20;

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1kosmos.com/integrations/identity-verification/epic-identity-verification-in-mychart-and-epiccare-link/setting-up-an-epic-oidc-client-in-1kosmos.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
