Ping SDKs

Authentication journey tutorial for an iOS React Native app

This tutorial covers the basics of developing a protected mobile app with React Native. You will develop the iOS bridge code along with a minimal React UI to authenticate a user.

Ping does not provide a React Native version of the Ping SDK. Instead we present this how-to as a guide to basic development of "bridge code" for connecting the Ping SDK for iOS to the React Native layer.

This guide covers how to implement the following application features using the Ping SDK for iOS and Ping SDK for JavaScript:

  1. Authentication through a simple journey/tree.

  2. Requesting OAuth/OIDC tokens.

  3. Requesting user information.

  4. Logging a user out.

react native todos screen
Figure 1. The to-do sample app

Before you begin

Before you begin this tutorial ensure you have set up your PingOne Advanced Identity Cloud tenant or PingAM server with the required configuration.

For example, you will need to configure an OAuth 2.0 client application, as well as an authentication journey for the app to navigate.

Step 1. Download the samples

To start this tutorial, you need to download the SDK sample apps repo, which contains the projects you will use.

Step 2. Configure the projects

In this step you install the dependencies the projects require, and configure the connection properties.

Step 3. Configure connection properties

In this step, you configure the samples to connect to the authentication tree/journey and OAuth 2.0 client you created when setting up your server configuration.

Step 4. Build and run the project

Build and run the apps, and learn about Hot Module Reloading.

Step 5. Implement the iOS bridge code

In this step you implement the bridge code and add methods for starting the Ping SDK, logging a user in, stepping through a journey, and finally logging a user out.

Step 6. Implement the UI in React Native

In this final step you implement the user interface for logging in, and code for submitting the forms. You will also handle returning to the list view, requesting user info, and handling logout triggers.

This is also the moment you can try out the fully functioning app.