---
title: Step 2. Configure connection properties
description: Prepare
component: sdks
version: latest
page_id: sdks:oidc:tutorials/android/aic/02_configuring-connection-properties
canonical_url: https://docs.pingidentity.com/sdks/latest/oidc/tutorials/android/aic/02_configuring-connection-properties.html
revdate: Thu, 24 Apr 2025 14:44:20 +0100
keywords: ["OAuth 2.0", "OpenID Connect", "Tutorial", "Source Code", "Integration", "SDK", "Android"]
---

# Step 2. Configure connection properties

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

* [Download](01_downloading-samples-repo.html)

* **Configure**

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

***

In this step, you configure the kotlin-central-login-oidc sample to connect to the OAuth 2.0 application you created in PingOne Advanced Identity Cloud, using OIDC login.

1. In Android Studio, open the `sdk-sample-apps/android/kotlin-central-login-oidc` project you cloned in the previous step.

2. In the Project pane, switch to the Android view.

3. In the Android view, navigate to **app > kotlin+java > com.example.app**, and open `Config.kt`.

4. Edit the default values provided in the `PingConfig` class with the values from your PingOne Advanced Identity Cloud tenant:

   ```kotlin
   data class PingConfig(
       var discoveryEndpoint: String = "https://openam-sdks.forgeblocks.com/am/oauth2/realms/alpha/.well-known/openid-configuration",
       var oauthClientId: String = "AndroidTest",
       var oauthRedirectUri: String = "org.forgerock.demo://oauth2redirect",
       var oauthSignOutRedirectUri: String = "",
       var cookieName: String = "5421aeddf91aa20",
       var oauthScope: String = "openid profile email address"
   )
   ```

   * *discoveryEndpoint*

     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). |

   * *oauthClientId*

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

     For example, `sdkPublicClient`

   * *oauthRedirectUri*

     The `redirect_uri` as configured in the OAuth 2.0 client profile.

     This value must exactly match a value configured in your OAuth 2.0 client.

     For example, `org.forgerock.demo://oauth2redirect`

   * *oauthSignOutRedirectUri*

     Leave this property empty.

     It signals that the SDK does not need to open and return from a web page to perform log out.

   * *cookieName*

     The name of the cookie your PingOne Advanced Identity Cloud tenant uses to store SSO tokens in client browsers.

     > **Collapse: How do I find my PingOne Advanced Identity Cloud cookie name?**
     >
     > To locate the cookie name in an PingOne Advanced Identity Cloud tenant:
     >
     > 1. Navigate to Tenant settings > Global Settings
     >
     > 2. Copy the value of the Cookie property.

     For example, `ch15fefc5407912`

   * *oauthScope*

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

     For example, `openid profile email address`

   The result resembles the following:

   ```kotlin
   data class PingConfig(
       var discoveryEndpoint: String = "https://openam-forgerock-sdks.forgeblocks.com/am/oauth2/realms/alpha/.well-known/openid-configuration",
       var oauthClientId: String = "sdkNativeClient",
       var oauthRedirectUri: String = "org.forgerock.demo://oauth2redirect",
       var oauthSignOutRedirectUri: String = "",
       var cookieName: String = "ch15fefc5407912",
       var oauthScope: String = "openid profile email address"
   )
   ```

5. Save your changes.
