Skip to content

App clients

Create additional clients that share users with this app, but override the base app settings.

By default, an app does not have an app client. To add a client, go to the API Keys page, and find the Add app client buttons. Create a client, giving it a name, which is not shared with users.

Each App client has a unique Client ID. Your Client ID is used to identify your app client within your Privy app, and is necessary to use it when you initialize the PrivyProvider in your frontend. Like your App ID, your Client ID value is automatically generated when your app is created and is immutable.

tsx
<PrivyProvider appId="your-privy-app-id" clientId="your-privy-app-client-id">
  {/* your app's content */}
</PrivyProvider>

Within an app client, you can choose to enable or disable Cookies. You can also set multiple Allowed origins. If cookies are enabled, the app’s base domain must be one of the allowed origins.

Base domain

All app clients for the same app ID must share the same base domain. This is controlled at the app level.

Cookies

Once you enable a base domain, Privy will automatically store a user's token as an HttpOnly cookie on the base domain. You can use app clients to enable or disable cookies for different environments once you enable a base domain. To do this, toggle cookies on or off in your app client.

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 base domain must be one of the allowed origins.