---
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:journey:use-cases/external-idp/react-native/02_handling_uri_schemes
canonical_url: https://developer.pingidentity.com/orchsdks/journey/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: Tue, 10 Jun 2026 00:00:00 +0000
keywords: ["PingOne Advanced Identity Cloud", "PingAM", "Setup &amp; Configuration", "Source Code", "Integration", "SDK", "React Native"]
section_ids:
  configuring_uri_schemes_on_android: Configuring URI schemes on Android
  configuring_uri_schemes_on_ios: Configuring URI schemes on iOS
---

# Step 2. Handling URI schemes

[icon: circle-check, set=far]PingOne Advanced Identity Cloud [icon: circle-check, set=far]PingAM [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 redirect URI configured in Advanced Identity Cloud or PingAM.

The **External IdP** module uses native provider SDKs where available, but falls back to browser redirect when a provider doesn't have native SDK support on a given platform.

Registering a URI scheme on both platforms ensures your app can handle these redirects in all cases.

## 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

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

Replace `myapp` with the custom scheme registered in your AIC configuration. This creates a redirect URI of the form `myapp://callback`.

## 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 scheme registered in your AIC configuration.

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