---
title: Step 3. Configuring connection properties
description: Configure the PingSampleApp connection properties for a PingOne DaVinci flow using a .env file.
component: orchsdks
page_id: orchsdks:davinci:try-it-out/react-native/03_configure_sample
canonical_url: https://developer.pingidentity.com/orchsdks/davinci/try-it-out/react-native/03_configure_sample.html
llms_txt: https://developer.pingidentity.com/orchsdks/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["PingOne", "DaVinci", "Setup &amp; Configuration", "Source Code", "Tutorial", "SDK", "React Native"]
section_ids:
  creating_the_environment_file: Creating the environment file
---

# Step 3. Configuring connection properties

[icon: circle-check, set=far]PingOne [icon: react, set=fab]React Native

* [Prepare](00_before-you-begin.html)

* [Download](01_download_samples.html)

* [Install](02_prepare-projects.html)

* **Configure**

* [Run](04_run_the_sample.html)

In this step, you configure the `PingSampleApp` project to connect to the PingOne OAuth 2.0 application and DaVinci flow you prepared earlier.

All connection settings are stored in a `.env` file in the `PingSampleApp` directory. The app reads this file when you build it.

## Creating the environment file

1. In a terminal, navigate to the `PingSampleApp` directory.

2. Copy the example environment file:

   ```shell
   cp .env.example .env
   ```

3. Open `.env` in a text editor and update the PingOne values:

   Example values in the .env file

   ```shell
   PINGONE_CLIENT_ID=6c7eb89a-66e9-ab12-cd34-eeaf795650b2
   PINGONE_DISCOVERY_ENDPOINT=https://auth.pingone.com/3072206d-c6ce-ch15-m0nd-f87e972c7cc3/as/.well-known/openid-configuration
   PINGONE_REDIRECT_URI=org.forgerock.demo://oauth2redirect
   PINGONE_SCOPES=openid, email, address, profile
   PINGONE_ACR_VALUES=
   PINGONE_ENVIRONMENT_LABEL=PingOne DaVinci
   ```

   * *PINGONE_CLIENT_ID*

     The client ID from your OAuth 2.0 application in PingOne.

     For example, `6c7eb89a-66e9-ab12-cd34-eeaf795650b2`.

   * *PINGONE_DISCOVERY_ENDPOINT*

     The `.well-known` endpoint from your PingOne environment.

     > **Collapse: How do I find my PingOne .well-known URL?**
     >
     > To find the `.well-known` endpoint for an OAuth 2.0 client in PingOne:
     >
     > 1. Log in to your PingOne administration console.
     >
     > 2. Go to **Applications > Applications**, and then select your OAuth 2.0 client.
     >
     >    For example, sdkPublicClient.
     >
     > 3. On the **Overview** tab, expand the **Connection Details** section, and then copy the **OIDC Discovery Endpoint** value.
     >
     >    ![Locating the .well-known URL in a PingOne client profile.](../../../_images/p1-client-well-known.png)

   * *PINGONE_REDIRECT_URI*

     The redirect URI configured in your OAuth 2.0 client profile.

     This value must exactly match a redirect URI registered in PingOne.

     For this tutorial, use `org.forgerock.demo://oauth2redirect` unless you update the corresponding native app configuration.

     If you use a different redirect scheme, update the Android `appRedirectUriScheme` value in `PingSampleApp/android/app/build.gradle`, the iOS `CFBundleURLSchemes` value in `PingSampleApp/ios/PingSampleApp/Info.plist`, and the OAuth 2.0 client configuration in PingOne.

   * *PINGONE_SCOPES*

     A comma-separated list of OAuth 2.0 scopes to request.

     For example, `openid, email, address, profile`.

   * *PINGONE_ACR_VALUES*

     Optionally, the DaVinci flow policy to invoke.

     Enter a DaVinci flow policy ID, or leave this value empty to use the environment's default authentication policy.

   * *PINGONE_ENVIRONMENT_LABEL*

     The label displayed by the sample app for this PingOne configuration.

4. Save your changes.

The app reads the updated values the next time you build and run it.

|   |                                                                                                                                                                                     |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | The `.env.example` file contains additional `FACEBOOK_` and `GOOGLE_IOS_` settings for external identity provider examples. You can leave those values unchanged for this tutorial. |
