---
title: Step 2. Configure connection properties
description: Explains how to install dependencies and configure the connection properties in the sample app for the React Native OIDC sign-on module tutorial with PingAM.
component: orchsdks
page_id: orchsdks:oidc:try-it-out/react-native/pingam/02_configuring-connection-properties
canonical_url: https://developer.pingidentity.com/orchsdks/oidc/try-it-out/react-native/pingam/02_configuring-connection-properties.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: ["OAuth 2.0", "OpenID Connect", "Tutorial", "Source Code", "Integration", "SDK", "React Native", "PingAM", "connection properties"]
section_ids:
  installing_dependencies: Installing dependencies
  configuring_connection_properties: Configuring connection properties
---

# Step 2. Configure connection properties

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

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

* [Download](01_download-sample-repo.html)

* **Configure**

* [Run](03_test-the-app.html)

In this step, you install the project dependencies and configure the reactnative-oidc sample to connect to the OAuth 2.0 application you created in PingAM.

|   |                                                                                                                              |
| - | ---------------------------------------------------------------------------------------------------------------------------- |
|   | Run all the commands on this page from the sample app's project root folder, `sdk-sample-apps/reactnative/reactnative-oidc`. |

## Installing dependencies

1. Install the JavaScript dependencies:

   ```shell
   yarn install
   ```

2. iOS only, install the native CocoaPods dependencies:

   ```shell
   cd ios
   bundle install
   bundle exec pod install
   cd ..
   ```

3. On Android only, configure a keystore and add the passwords as follows:

   1. Generate a debug signing keystore:

      ```shell
      keytool -genkeypair -v \
        -keystore android/app/debug.keystore \
        -alias androiddebugkey \
        -keyalg RSA -keysize 2048 -validity 10000 \
        -storepass 5tr0ngP@S5w0rd! -keypass 5tr0ngP@S5w0rd! \
        -dname "CN=Android Debug,O=Android,C=US"
      ```

      Replace ***5tr0ngP\@S5w0rd!*** with a password of your choice, using the same value for both the `-storepass` and `-keypass` parameters.

      |   |                                                                                                                                                                                                                                                                                                                        |
      | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
      |   | The generated keystore file must be located in `sdk-sample-apps/reactnative/reactnative-oidc/android/app/debug.keystore`, and use the alias `androiddebugkey`.The build will fail if the keystore file is missing, or if the passwords in your Gradle properties do not match those used when generating the keystore. |

   2. Add the keystore credentials to your global Gradle properties file, for example at `~/.gradle/gradle.properties`:

      ```properties
      KEYSTORE_PASSWORD=5tr0ngP@S5w0rd!
      KEY_PASSWORD=5tr0ngP@S5w0rd!
      ```

## Configuring connection properties

1. Copy the example environment file:

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

2. Open `.env` in a text editor and update the `AIC_` values to match your environment:

   Example values in the .env file

   ```shell
   AIC_CLIENT_ID=sdkPublicClient
   AIC_DISCOVERY_ENDPOINT=https://openam.example.com:8443/openam/oauth2/realms/root/.well-known/openid-configuration
   AIC_REDIRECT_URI=org.forgerock.oidc://oauth2redirect
   AIC_SCOPES=openid, email, address, profile
   ```

   * *AIC\_CLIENT\_ID*

     The client ID of the OAuth 2.0 application you registered in PingAM.

     For example, `sdkPublicClient`

   * *AIC\_DISCOVERY\_ENDPOINT*

     The `.well-known` OpenID Connect discovery endpoint for your server.

     > **Collapse: How do I find my PingAM  URL?**
     >
     > To form the `.well-known` URL for an PingAM server, concatenate the following information into a single URL:
     >
     > 1. The base URL of the PingAM component of your deployment, including the port number and deployment path.
     >
     >    For example, `https://openam.example.com:8443/openam`
     >
     > 2. The string `/oauth2`
     >
     > 3. The hierarchy of the realm that contains the OAuth 2.0 client.
     >
     >    You must specify the entire hierarchy of the realm, starting at the Top Level Realm. Prefix each realm in the hierarchy with the `realms/` keyword.
     >
     >    For example, `/realms/root/realms/customers`
     >
     >    |   |                                                                                 |
     >    | - | ------------------------------------------------------------------------------- |
     >    |   | If you omit the realm hierarchy, the top level `ROOT` realm is used by default. |
     >
     > 4. The string `/.well-known/openid-configuration`
     >
     > For example, `https://openam.example.com:8443/openam/oauth2/realms/root/.well-known/openid-configuration`

     For example, `https://openam.example.com:8443/openam/oauth2/realms/root/.well-known/openid-configuration`

   * *AIC\_REDIRECT\_URI*

     The redirect URI configured in your OAuth 2.0 client profile.

     This value must exactly match a redirect URI registered in your server.

     For this tutorial, the sample application is pre-configured to use the following redirect URI: `org.forgerock.oidc://oauth2redirect`.

     |   |                                                                                                                                                                                                                                                                                                                                                                                                      |
     | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     |   | If you use a different redirect scheme, you must also update the values in the following locations:- Android - `manifestPlaceholders["appRedirectUriScheme"]` in `sdk-sample-apps/reactnative/reactnative-oidc/android/app/build.gradle`

     - iOS - `CFBundleURLSchemes` in `sdk-sample-apps/reactnative/reactnative-oidc/ios/PingSampleApp/Info.plist`

     - The OAuth 2.0 client settings in the server |

   * *AIC\_SCOPES*

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

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

3. Save your changes.

With the environment file configured, the React Native app will pick up your settings the next time you build and run it.

|   |                                                                                                                                                                                   |
| - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Although the variable names in `.env.example` use the `AIC_` prefix, the same client configuration block is used for both PingOne Advanced Identity Cloud and PingAM connections. |
