Auth (legacy)

Create Auth Provider SDK keys

Generates SDK or API Keys for the auth provider. These might be called different things depending on the auth provider you're using, but are generally used for setting up the frontend and backend SDKs.

post/projects/auth/keys

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/auth/keys
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Request body

project_idstring required

The Neon project ID. Returned as id from GET /projects.

auth_provider'mock' | 'stack' | 'better_auth' required

Authentication provider integrated with this Neon Auth configuration. better_auth integrates with Better Auth (the current, recommended provider). stack integrates with Stack Auth (deprecated). mock is a simulated provider for local development and testing only.

Example request

{
  "project_id": "wispy-forest-12345678"
}

Response

Creates Auth Provider SDK keys

auth_provider'mock' | 'stack' | 'better_auth' required

Authentication provider integrated with this Neon Auth configuration. better_auth integrates with Better Auth (the current, recommended provider). stack integrates with Stack Auth (deprecated). mock is a simulated provider for local development and testing only.

auth_provider_project_idstring required

Project ID assigned by the auth provider for this integration.

pub_client_keystring required

Publishable SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth.

secret_server_keystring required

Secret server-side SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. Treat as a credential.

jwks_urlstring required

URL of the provider's JWKS endpoint used to verify JWTs.

schema_namestring required

Postgres schema containing the auth integration tables. Defaults to neon_auth.

table_namestring required

Postgres table in the integration schema where synced user records are stored.

base_urlstring

Base URL of the Neon Auth service for this integration. Set as the NEON_AUTH_BASE_URL environment variable in your application.

Changes

No recorded changes to this operation across all 15 revisions of this API.