The neon-auth command manages Managed Better Auth on a database branch from the terminal. You can enable or disable Managed Better Auth, configure OAuth providers, trusted domains, email settings, and webhooks, and manage auth users.
Requires neon 2.23.0 or later. Check your version with neon --version.
If --project-id or --branch are omitted, the CLI resolves them from your context file, auto-selects when there is only one option, and prompts otherwise.
Enable and status
neon neon-auth enable
Provisions Managed Better Auth on the current branch.
neon neon-auth enable [options]neon neon-auth enableneon neon-auth status
Shows whether Managed Better Auth is configured on the branch and displays the current connection details.
neon neon-auth status [options]neon neon-auth statusneon neon-auth disable
Removes Managed Better Auth from the branch.
neon neon-auth disable [options]important
The --delete-data option permanently deletes all Managed Better Auth data and schema from the database. This can't be undone.
Remove Managed Better Auth from the branch and delete its data:
neon neon-auth disable --delete-dataOAuth providers
The oauth-provider subcommands manage the OAuth providers (google, github, and vercel) for the branch.
neon neon-auth oauth-provider list
Lists the OAuth providers configured for the branch.
neon neon-auth oauth-provider list [options]neon neon-auth oauth-provider listneon neon-auth oauth-provider add
Adds an OAuth provider.
neon neon-auth oauth-provider add [options]Add the Google OAuth provider with your own credentials:
neon neon-auth oauth-provider add --provider-id google --oauth-client-id <client-id> --oauth-client-secret <client-secret>neon neon-auth oauth-provider update
Updates the credentials for an existing OAuth provider.
neon neon-auth oauth-provider update [options]neon neon-auth oauth-provider update --provider-id github --oauth-client-id <client-id> --oauth-client-secret <client-secret>neon neon-auth oauth-provider delete
Deletes an OAuth provider from the branch.
neon neon-auth oauth-provider delete [options]neon neon-auth oauth-provider delete --provider-id vercelDomains
The domain subcommands manage the trusted domains that Managed Better Auth accepts as redirect URIs for the branch.
Subcommands: add, allow-localhost, delete, list
neon neon-auth domain list
Lists the trusted domains configured for the branch.
neon neon-auth domain list [options]neon neon-auth domain listneon neon-auth domain add
Adds a trusted domain.
neon neon-auth domain add <domain> [options]neon neon-auth domain add example.comneon neon-auth domain delete
Deletes a trusted domain.
neon neon-auth domain delete <domain> [options]neon neon-auth domain delete example.comneon neon-auth domain allow-localhost
Manages localhost connection settings for the branch.
neon neon-auth domain allow-localhost get
Gets the current localhost connection setting.
neon neon-auth domain allow-localhost get [options]neon neon-auth domain allow-localhost getneon neon-auth domain allow-localhost enable
Allows localhost connections for local development.
neon neon-auth domain allow-localhost enable [options]neon neon-auth domain allow-localhost enableneon neon-auth domain allow-localhost disable
Restricts localhost connections.
neon neon-auth domain allow-localhost disable [options]neon neon-auth domain allow-localhost disableConfiguration
The config subcommands configure auth features for the branch: email and password authentication, the email provider, the organization plugin, and webhooks.
Subcommands: email-password, email-provider, organization, webhook
neon neon-auth config email-password
Manages email and password authentication settings.
neon neon-auth config email-password get
Gets the current email and password configuration.
neon neon-auth config email-password get [options]neon neon-auth config email-password getneon neon-auth config email-password update
Updates the email and password configuration.
neon neon-auth config email-password update [options]neon neon-auth config email-password update --enabled --require-email-verificationneon neon-auth config email-provider
Manages the email provider configuration.
neon neon-auth config email-provider get
Gets the current email provider configuration.
neon neon-auth config email-provider get [options]neon neon-auth config email-provider getneon neon-auth config email-provider update
Updates the email provider configuration.
neon neon-auth config email-provider update [options]Configure the standard email provider type with your own SMTP server:
neon neon-auth config email-provider update --type standard --host smtp.example.com --port 587 --username example_username --password AbC123dEf --sender-email noreply@example.com --sender-name "Example App"neon neon-auth config email-provider test
Sends a test email so you can verify your SMTP configuration.
neon neon-auth config email-provider test [options]neon neon-auth config email-provider test --recipient-email user@example.com --host smtp.example.com --port 587 --username example_username --password AbC123dEf --sender-email noreply@example.com --sender-name "Example App"neon neon-auth config organization
Manages organization plugin settings.
neon neon-auth config organization get
Gets the current organization plugin configuration.
neon neon-auth config organization get [options]neon neon-auth config organization getneon neon-auth config organization update
Updates the organization plugin configuration.
neon neon-auth config organization update [options]neon neon-auth config organization update --enabled --limit 5 --creator-role ownerneon neon-auth config webhook
Manages webhook configuration.
neon neon-auth config webhook get
Gets the current webhook configuration.
neon neon-auth config webhook get [options]neon neon-auth config webhook getneon neon-auth config webhook update
Updates the webhook configuration.
neon neon-auth config webhook update [options]neon neon-auth config webhook update --enabled --url https://example.com/webhooks/neon-auth --enabled-events user.created --timeout 5Plugins
The plugins subcommands show the Managed Better Auth plugin configurations for the branch.
neon neon-auth plugins list
Lists all plugin configurations.
neon neon-auth plugins list [options]neon neon-auth plugins listneon neon-auth plugins get
Gets a specific plugin configuration.
neon neon-auth plugins get <plugin-name> [options]neon neon-auth plugins get organizationUsers
The user subcommands manage Managed Better Auth users on the branch.
neon neon-auth user create
Creates an auth user.
neon neon-auth user create [options]neon neon-auth user create --email alex@example.com --name "Alex Lopez"neon neon-auth user delete
Deletes an auth user.
neon neon-auth user delete <user-id> [options]neon neon-auth user delete <user-id>neon neon-auth user set-role
Sets roles for an auth user.
neon neon-auth user set-role <user-id> [options]neon neon-auth user set-role <user-id> --roles admin







