App clients
App clients allow you to create configure specific settings for different consumers/platforms for your app, including mobile apps, web apps, and more.
To add a client, go to the Configuration > App settings page > Clients tab, and find the “Add app client” button.
This step is optional if you’re using the React SDK. App clients are required for all other mobile and non-web platforms to allow your app to interact with the Privy API.
Cookies
Once you enable HttpOnly cookies on your app and add an app domain, Privy will automatically store a user’s token as an HttpOnly cookie on the app domain. You can use app clients to enable or disable cookies for different environments.
Learn more about cookies here!.
Allowed origins
Each app client can have a different set of allowed origins. You can set allowed origins on your app client. Note that if cookies are enabled, the app’s domain must be one of the allowed origins.
Learn more about allowed origins here!.
Session duration
You can set the session duration for each app client. The session duration is the number of days that a user’s session will last before they are logged out.
Cookies
Once you enable HttpOnly cookies on your app and add an app domain, Privy will automatically store a user’s token as an HttpOnly cookie on the app domain. You can use app clients to enable or disable cookies for different environments.
Learn more about cookies here!.
Allowed origins
Each app client can have a different set of allowed origins. You can set allowed origins on your app client. Note that if cookies are enabled, the app’s domain must be one of the allowed origins.
Learn more about allowed origins here!.
Session duration
You can set the session duration for each app client. The session duration is the number of days that a user’s session will last before they are logged out.
Allowed app 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. An empty list will mean all requests are denied. You must configure at least one application identifier to use the React Native SDK.
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
.
If you are using Expo Go, add host.exp.Exponent
to allow requests.
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
.
If you are using Expo Go, add host.exp.Exponent
to allow requests.
We’ll use your project’s bundle identifier, which you can find under the “Identity” section of your app’s target file. It likely has reverse domain format, like “com.myorg.app”.
We’ll use your projects application ID from your app’s build.gradle file.
Copy your project’s bundle identifier, which you can find under the “Identity” section of your app’s target file. It likely has reverse domain format, like “com.myorg.app”.
To enforce secure usage of your Privy client ID, register your app’s bundle identifier under the app client that was just created.
- Copy your iOS project’s bundle identifier, which you can find under the “Identity” section of your app’s target file.
- Copy your Android project’s application ID from your app’s build.gradle file.
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.
You must register at least one URL scheme, and 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
and https
) will be rejected. You must register at least one URL scheme.
myapp://shire
) will only allow exactly that path. By specifying a scheme only (e.g. myapp
), all paths will be supported.To register your URL scheme, copy your application’s URL scheme from app.json
or app.config.ts
and register it in the app client settings.
exp
as the URL scheme for the Expo Go app.To register your URL scheme, copy your application’s URL scheme from app.json
or app.config.ts
and register it in the app client settings.
exp
as the URL scheme for the Expo Go app.First, register your URL scheme in your Xcode project. If you’re unsure how, you can follow these steps. Then, use the URL scheme you registered in the app client settings.
For non-web platforms, be sure to setup deeplinking with your allowed URL scheme.
Session duration
You can set the session duration for each app client. The session duration is the number of days that a user’s session will last before they are logged out.