/projects/auth/keysCreate Auth Provider SDK keysGenerates 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.
Request body
requiredapplication/json
auth_providerstringrequiredAuthentication 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.
project_idstringrequiredThe Neon project ID. Returned as `id` from `GET /projects`.
{
"auth_provider": "better_auth",
"project_id": "wispy-forest-12345678"
}Responses
auth_providerstringrequiredAuthentication 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_idstringrequiredProject ID assigned by the auth provider for this integration.
base_urlstringBase URL of the Neon Auth service for this integration. Set as the NEON_AUTH_BASE_URL environment variable in your application.
jwks_urlstringrequiredURL of the provider's JWKS endpoint used to verify JWTs.
pub_client_keystringrequiredPublishable SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth.
schema_namestringrequiredPostgres schema containing the auth integration tables. Defaults to `neon_auth`.
secret_server_keystringrequiredSecret server-side SDK key from the auth provider. Populated only for Stack Auth (deprecated); empty for Better Auth. Treat as a credential.
table_namestringrequiredPostgres table in the integration schema where synced user records are stored.
{
"auth_provider": "better_auth",
"auth_provider_project_id": "string",
"base_url": "string",
"jwks_url": "string",
"pub_client_key": "string",
"schema_name": "string",
"secret_server_key": "string",
"table_name": "string"
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}