Appearance
Configuring your app ID for Expo
To use Privy's Expo SDK, you must first configure a few settings for your Privy App ID in the Privy Dashboard.
1. Request access
To use Privy's Expo SDK, you must first request access to the Expo plugin in the Privy Dashboard on the plugins page.
Once your request has been received, the Privy team will configure your App ID to be compatible with Expo and native mobile environments.
2. Configure your allowed application identifiers
To enforce secure usage of your Privy App ID, configure Privy to restrict which mobile apps can use your Privy App ID based on your mobile applications' application identifiers.
TIP
Configuring allowed application identifiers for mobile apps is similar to configuring allowed domains for web apps.
To set this restriction, we'll use the unique value that identifies your app in the Apple App Store or Google Play Store.
For iOS apps, this is the bundleIdentifier
. For Android apps, this is the package
.
First, copy your application identifier from app.config.js
or app.json
.
ts
{
// other config
"ios": {
"bundleIdentifier": "com.myorg.app" // <┐
}, // │
// ├─ your application identifier
"android": { // │
"package": "com.myorg.app" // <─────────┘
}
}
Next, go to the App Clients page for your app to register the application identifiers you retrieved earlier in a new client.
Please note that:
- Multiple application identifiers can be registered for the same Privy App ID.
- An empty list will mean all requests from mobile apps are denied. You must configure at least one application identifier to use the Expo SDK with the given Privy App ID.
- For development only, if you are using Expo Go, add
host.exp.Exponent
to allow requests.
3. Configure allowed URL schemes
To use Privy's social login flows (Apple, Google, etc.), you must also register the URL scheme (e.g. myapp://
) for your application with Privy.
To do so, copy your application's URL scheme from app.json
or app.config.ts
and register it on the App Clients page. This configuration is right below the configuration for allowed application IDs, which you just completed.
Please note:
- Multiple URL schemes can be added for the same Privy App ID.
- An empty list will mean that requests coming from URL schemes other than web defaults (
http
andhttps
) will be rejected. You must register at least one URL scheme. - A full URL scheme, including path (e.g.
myapp://shire
) will only allow exactly that path. By specifying a scheme only (e.g.myapp
), all paths will be supported. - For development only if you are using Expo Go, enter
exp
as the URL scheme for the Expo Go app.
Why is this required?
Certain flows within the Privy authentication process require Privy to register allowed callback URLs with third-party service providers. The plainest example of this is social login flows using the OAuth 2.0 Protocol, where Privy must register allowed callback URLs with Google, Apple, and other OAuth login providers.
Configuring your allowed URL schemes in the Privy Dashboard ensures Privy updates the appropriate settings with these third-party service providers!