---
title: Step 3. Configure connection properties
description: Prepare
component: sdks
version: latest
page_id: sdks:oidc:tutorials/javascript/aic/03_configure_connection_properties
canonical_url: https://docs.pingidentity.com/sdks/latest/oidc/tutorials/javascript/aic/03_configure_connection_properties.html
revdate: Wed, 16 Oct 2024 14:10:20 +0100
keywords: ["OAuth 2.0", "OpenID Connect", "Tutorial", "Source Code", "Integration", "SDK", "JavaScript"]
---

# Step 3. Configure connection properties

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

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

* [Install](02_install-dependencies.html)

* **Configure**

* [Run](04_test_the_app.html)

***

In this step, you configure the sample app to connect to the OAuth 2.0 application you created in PingOne Advanced Identity Cloud.

1. In the IDE of your choice, open the `sdk-sample-apps` folder you cloned in the previous step.

2. Make a copy of the `/javascript/central-login-oidc/.env.example` file, and name it `.env`.

   The `.env` file provides the values used by the `Config.setAsync()` method in `javascript/central-login-oidc/src/main.js`.

3. Update the `.env` file with the details of your PingOne Advanced Identity Cloud instance.

   ```javascript
   SCOPE="$SCOPE"
   TIMEOUT=$TIMEOUT
   WEB_OAUTH_CLIENT="$WEB_OAUTH_CLIENT"
   WELL_KNOWN="$WELL_KNOWN"
   SERVER_TYPE="$SERVER_TYPE"
   ```

   Replace the following strings with the values you obtained when preparing your environment.

   * *$SCOPE*

     The scopes you added to your OAuth 2.0 application in PingOne Advanced Identity Cloud.

     For example, `address email openid phone profile`

   * *$TIMEOUT*

     How long to wait for OAuth 2.0 timeouts, in milliseconds.

     For example, `3000`

   * *$WEB\_OAUTH\_CLIENT*

     The client ID from your OAuth 2.0 application in PingOne Advanced Identity Cloud.

     For example, `sdkPublicClient`

   * *$WELL\_KNOWN*

     The `.well-known` endpoint from your PingOne Advanced Identity Cloud tenant.

     > **Collapse: How do I find my PingOne Advanced Identity Cloud  URL?**
     >
     > You can view the `.well-known` endpoint for an OAuth 2.0 client in the PingOne Advanced Identity Cloud admin console:
     >
     > 1. Log in to your PingOne Advanced Identity Cloud administration console.
     >
     > 2. Click Applications, and then select the OAuth 2.0 client you created earlier. For example, sdkPublicClient.
     >
     > 3. On the Sign On tab, in the Client Credentials section, copy the Discovery URI value.
     >
     >    For example, `https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/alpha/.well-known/openid-configuration`
     >
     > |   |                                                                                                                                                                                                                                                                                                                                 |
     > | - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     > |   | If you are using a custom domain, your `.well-known` is formed as follows:`https://<custom-domain-fqdn>/.well-known/openid-configuration`Learn more in [Access OIDC configuration discovery endpoint](https://docs.pingidentity.com/pingoneaic/latest/realms/custom-domains.html#access-oidc-configuration-discovery-endpoint). |

   * *$SERVER\_TYPE*

     Ensures the sample app uses the correct behavior for the different servers it supports, for example what logout parameters to use.

     For PingOne Advanced Identity Cloud and PingAM servers, specify `AIC`.

   The result resembles the following:

   `.env`

   ```javascript
   SCOPE="address email openid phone profile"
   TIMEOUT=3000
   WEB_OAUTH_CLIENT="sdkPublicClient"
   WELL_KNOWN="https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/alpha/.well-known/openid-configuration"
   SERVER_TYPE="AIC"
   ```
