Configuration

Configuring Privy and Environment Variables.

Created: 1/4/2026

Configuration

The Admin Portal relies on a dual-Privy configuration to securely authenticate admins while accessing the user data of the target application.

Environment Variables

Configure the following variables in your .env file:

Admin Authentication (Login)

These credentials secure the Admin Portal itself.

  • NEXT_PUBLIC_PRIVY_APP_ID: The App ID for the Admin Portal instance in Privy.
  • NEXT_PUBLIC_PRIVY_CLIENT_ID: The Client ID (often used for wallet connectors/signers).

Target Application Access (Data)

These credentials allow the Admin Portal to fetch data from the Main Application.

  • ADMIN_PRIVY_APP_ID: The App ID of the Target App (e.g., the User App).
  • ADMIN_PRIVY_APP_SECRET: The Secret Key for the Target App. This is required to make server-side API calls to fetch user data.

Privy Setup Requirements

1. Dedicated Admin App ID

Create a specific project/app in the Privy Dashboard for the Admin Portal. Do not reuse the User App's ID for admin login to prevent session conflicts and security risks.

2. Allowlist Policy

To restrict access to authorized personnel only, enable an Allowlist in the Privy Dashboard for the Admin Portal App ID.

  1. Go to Login Methods > Access.
  2. Enable Allowlist.
  3. Add the email addresses of the administrators who are permitted to log in.

3. Secret Key

Obtain the ADMIN_PRIVY_APP_SECRET from the Target App's settings in the Privy Dashboard. This key allows the Admin Portal to authenticate as a privileged server to query the Privy API for the target application's user base.