---
title: Before you begin
description: Outlines the prerequisites and server configuration steps required before starting the React Native OIDC sign-on module tutorial for PingAM.
component: orchsdks
page_id: orchsdks:oidc:try-it-out/react-native/pingam/00_before-you-begin
canonical_url: https://developer.pingidentity.com/orchsdks/oidc/try-it-out/react-native/pingam/00_before-you-begin.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", "prerequisites"]
section_ids:
  prerequisites: Prerequisites
  server_configuration: Server configuration
---

# Before you begin

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

* **Prepare**

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

* [Configure](02_configuring-connection-properties.html)

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

To successfully complete this tutorial refer to the prerequisites in this section.

The tutorial also requires a configured PingAM server.

## Prerequisites

* React Native

  This sample app requires React Native 0.80.1 or later.

* iOS

  This sample app requires iOS 16.0 or later.

* Android

  This sample app requires Android 10 (API level 29) or later.

The React Native development environment must be fully configured before you begin. Follow the official [React Native environment setup guide](https://reactnative.dev/docs/set-up-your-environment) and ensure the following tools are installed:

* Node.js and Yarn

  Install [Node.js](https://nodejs.org/) version 20 or later.

  This project uses Yarn. Install Yarn by running:

  ```shell
  corepack enable
  ```

* Xcode (iOS only)

  Download and install [Xcode](https://developer.apple.com/xcode/) from the Mac App Store.

  Xcode 15 or later is recommended.

* Ruby and Bundler (iOS only)

  Ruby 3.3.6 or later is required to manage CocoaPods.

  |   |                                                                                                                                                                                                |
  | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  |   | macOS ships with an older version of Ruby that is not compatible with this project.Install a current version using [rbenv](https://rbenv.org/) or a similar version manager before continuing. |

  Install [Bundler](https://bundler.io/) with:

  ```shell
  gem install bundler
  ```

* CocoaPods (iOS only)

  CocoaPods is installed locally during the tutorial. You do not need to install it globally.

* Android Studio (Android only)

  Download and install [Android Studio](https://developer.android.com/studio).

  An Android emulator or physical device is required to run the app. To add a virtual device, refer to [Create and manage virtual devices](https://developer.android.com/studio/run/managing-avds) on the Android Developers website.

* Java (Android only)

  Android Studio includes an embedded JDK. Java 17 is recommended and is bundled with recent versions of Android Studio.

* `keytool` (Android only)

  `keytool` is part of the Java Development Kit (JDK) and is used to generate the debug signing keystore required for the Android build. It is included with Android Studio's bundled JDK.

## Server configuration

This tutorial requires you to configure your PingAM server as follows:

> **Collapse: Task 1. Create a demo user**
>
> The samples and tutorials in this documentation often require that you have an identity set up so that you can test authentication.
>
> To create a demo user in PingAM, follow these steps:
>
> 1. Log in to the PingAM admin UI as an administrator.
>
> 2. Navigate to [icon: address-card, set=fa]Identities, and then click [icon: plus, set=fa]Add Identity.
>
> 3. Enter the following details:
>
>    * **User ID** = `demo`
>
>    * **Password** = `Ch4ng3it!`
>
>    * **Email Address** = `demo.user@example.com`
>
> 4. Click Create.

> **Collapse: Task 2. Create an authentication tree**
>
> Authentication trees provide fine-grained authentication by allowing multiple paths and decision points throughout the authentication flow. Authentication trees are made up of nodes that define actions taken during authentication.
>
> Each node performs a single task, such as collecting a username or making a simple decision. Nodes can have multiple outcomes rather than just success or failure.
>
> To create a simple tree for use when testing the Orchestration SDKs, follow these steps:
>
> 1. Under Realm Overview, click Authentication Trees, then click Create Tree.
>
> 2. Enter a tree name, for example `sdkUsernamePasswordJourney`, and then click Create.
>
>    The authentication tree designer appears, showing the Start entry point connected to the Failure exit point.
>
> 3. Drag the following nodes from the Components panel on the left side into the designer area:
>
>    * **Page Node**
>
>    * **Username Collector**
>
>    * **Password Collector**
>
>    * **Data Store Decision**
>
> 4. Drag and drop the **Username Collector** and **Password Collector** nodes onto the **Page Node**, so that they both appear on the same page when logging in.
>
> 5. Connect the nodes as follows:
>
>    ![trees node login example](../../../../_images/trees-node-login-example.png)Figure 1. Example username and password authentication tree
>
> 6. Select the **Page Node**, and in the Properties pane, set the Stage property to `UsernamePassword`.
>
>    |   |                                                                                                            |
>    | - | ---------------------------------------------------------------------------------------------------------- |
>    |   | You can configure the node properties by selecting a node and altering properties in the right-hand panel. |
>
>    One of the samples uses this specific value to determine the custom UI to display.
>
> 7. Click **Save**.

> **Collapse: Task 3. Register a public OAuth 2.0 client**
>
> Public clients do not use a client secret to obtain tokens because they are unable to keep them hidden. The Orchestration SDKs commonly use this type of client to obtain tokens, as they cannot guarantee safekeeping of the client credentials in a browser or on a mobile device.
>
> To register a *public* OAuth 2.0 client application for use with the SDKs in AM, follow these steps:
>
> 1. Log in to the PingAM admin UI as an administrator.
>
> 2. Navigate to [icon: list-alt, set=fa]Applications > OAuth 2.0 > Clients, and then click [icon: plus, set=fa]Add Client.
>
> 3. In Client ID, enter `sdkPublicClient`.
>
> 4. Leave Client secret empty.
>
> 5. In Redirection URIs, enter the following values:
>
>    `org.forgerock.oidc://oauth2redirect`
>
>    |   |                                                                        |
>    | - | ---------------------------------------------------------------------- |
>    |   | Also add any other domains where you will be hosting SDK applications. |
>
> 6. In Scopes, enter the following values:
>
>    `openid profile email address`
>
> 7. Click Create.
>
>    PingAM creates the new OAuth 2.0 client, and displays the properties for further configuration.
>
> 8. On the Core tab:
>
>    1. In Client type, select `Public`.
>
>    2. Disable Allow wildcard ports in redirect URIs.
>
>    3. Click Save Changes.
>
> 9. On the Advanced tab:
>
>    1. In Grant Types, enter the following values:
>
>       ```none
>       Authorization Code
>       Refresh Token
>       ```
>
>    2. In Token Endpoint Authentication Method, select `None`.
>
>    3. Enable the Implied consent property.
>
> 10. Click Save Changes.

> **Collapse: Task 4. Configure the OAuth 2.0 provider**
>
> The provider specifies the supported OAuth 2.0 configuration options for a realm.
>
> To ensure the PingAM OAuth 2.0 provider service is configured for use with the Orchestration SDKs, follow these steps:
>
> 1. Log in to the PingAM admin UI as an administrator.
>
> 2. In the left panel, click [icon: plug, set=fa]Services.
>
> 3. In the list of services, click OAuth2 Provider.
>
> 4. On the Core tab, ensure Issue Refresh Tokens is enabled.
>
> 5. On the Consent tab, ensure Allow Clients to Skip Consent is enabled.
>
> 6. Click Save Changes.
