---
title: Step 2. Handling URI schemes
description: Register custom URI schemes on Android and iOS so the operating system routes external identity provider redirects back to your React Native app
component: orchsdks
page_id: orchsdks:davinci:use-cases/external-idp/react-native/02_handling_uri_schemes
canonical_url: https://developer.pingidentity.com/orchsdks/davinci/use-cases/external-idp/react-native/02_handling_uri_schemes.html
llms_txt: https://developer.pingidentity.com/orchsdks/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: Thu, 4 Sep 2026 00:00:00 +0000
keywords: ["PingOne", "DaVinci", "Flows", "Setup &amp; Configuration", "Source Code", "Integration", "SDK", "IdP", "React Native"]
section_ids:
  configuring_uri_schemes_on_android: Configuring URI schemes on Android
  configuring_uri_schemes_on_ios: Configuring URI schemes on iOS
  matching_the_redirect_uri_in_your_client: Matching the redirect URI in your client
---

# Step 2. Handling URI schemes

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

When a user authenticates with an external identity provider, the provider redirects them back to your app after the sign-in is complete.

For the operating system to know which app to open, you must register your app to handle a custom URI scheme that matches the return URL you configured in your DaVinci flow in [Configuring social sign-on in PingOne](../before-you-begin.html).

## Configuring URI schemes on Android

Define the URI scheme in your app's `android/app/build.gradle` file.

Add a manifest placeholder in the `android.defaultConfig` block:

Registering the URI scheme in build.gradle

```gradle
android {
    defaultConfig {
        manifestPlaceholders["appRedirectUriScheme"] = "myapp"
    }
}
```

Replace `myapp` with a custom scheme specific to your apps.

This creates a redirect URI of the form `myapp://callback`, which the **External IdP** module uses on devices that do not support Auth Tabs and fall back to Custom Tabs.

## Configuring URI schemes on iOS

Add your app's custom URL scheme to the `ios/<YourApp>/Info.plist` file so the OS can route the provider redirect back to your app.

Registering the URI scheme in Info.plist

```xml
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>myapp</string>
        </array>
    </dict>
</array>
```

Replace `myapp` with the custom scheme specific to your apps.

|   |                                                                                                                                          |
| - | ---------------------------------------------------------------------------------------------------------------------------------------- |
|   | If `CFBundleURLTypes` already exists in your `Info.plist`, add the new entry to the existing array rather than creating a duplicate key. |

## Matching the redirect URI in your client

In [step 4](04_authenticate_with_external_idps.html), you pass a `redirectUri` to the `createExternalIdpClient` function.

Use the custom scheme you registered here, for example `myapp://callback`.

On Android, when you omit the `redirectUri`, the **External IdP** module falls back to the `appRedirectUriScheme` manifest placeholder you registered above.
