Appearance
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 Settings page > Clients tab, 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 cookie domain must be one of the allowed origins.
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. To do this, toggle cookies on or off in your app client.
We recommend maintaining separate apps for development and for production. However, if you need to develop locally using a cookie-enabled production App ID, you can do so by creating a new app client for your production app, and disabling cookies for that app client. Then you can use your new Client ID to develop with your production App ID from a localhost
environment.
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.