> 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

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

1. To add a new OIDC application client in AdminX, follow these steps:&#x20;
2. Log in to your tenant as a community administrator.&#x20;
3. Navigate to Applications > Add Application.&#x20;
4. In the Add new applications page, scroll down to click the Add Integration link under the OIDC tile.&#x20;
5. In the Create new OIDC Integration page, enter the following fields:&#x20;
6. Application name – Descriptive text, for example, “Epic Identity Verification”&#x20;
7. Grant Type – Authorization Code&#x20;
8. 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.&#x20;
9. Scopes – The following scopes are required for Epic Identity Verification integration:
10. Profile - Required for user profile claims (enabled by default)&#x20;
11. OpenId - Required for OIDC authentication (enabled by default)
12. identity\_assurance - REQUIRED - Enables identity verification flow
13. idv\_flow\_{id} - REQUIRED - Specifies which workflow to trigger. &#x20;
14. Toggle the Returns a custom JSON payload switch to ON to enable claims transformation.&#x20;
15. &#x20;See Enabling and configuring the claims transformation script for more information on this section.&#x20;
16. After reviewing all the information, click Create.&#x20;

#### 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;

&#x20;\
`function mapClaims({ user = {}, ialData = {}, userDocuments = [], mapping = [], workflowSummary = null, errorContext = null }) {`&#x20;

`const claims = {};` &#x20;

&#x20; `if (workflowSummary || errorContext) {`&#x20;

`const personInfo = workflowSummary?.summary?.person_info || {};`&#x20;

&#x20;   `claims.firstname = personInfo.firstName || null;`&#x20;

&#x20;   `claims.lastname = personInfo.lastName || null;`&#x20;

&#x20;  `claims.ssn= personInfo.ssn|| null;`&#x20;

&#x20;   `claims.birthdate = personInfo.dob || null;`&#x20;

&#x20; `}`&#x20;

&#x20; `return claims;`&#x20;

`}`&#x20;

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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
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=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
