Merge branch 'general-provision' of github.com:stackframe-projects/stack into general-provision

This commit is contained in:
Zai Shi 2025-05-20 17:29:46 -07:00
commit 0fdf9105af
2 changed files with 1 additions and 2 deletions

View File

@ -51,4 +51,4 @@ STACK_SVIX_API_KEY=# enter the API key for the Svix webhook service here. Use `e
STACK_ACCESS_TOKEN_EXPIRATION_TIME=# enter the expiration time for the access token here. Optional, don't specify it for default value
STACK_SETUP_ADMIN_GITHUB_ID=# enter the account ID of the admin user here, and after running the seed script they will be able to access the internal project in the Stack dashboard. Optional, don't specify it for default value
OTEL_EXPORTER_OTLP_ENDPOINT=# enter the OpenTelemetry endpoint here. Optional, default is `http://localhost:4318`
STACK_INTEGRATION_CLIENTS_CONFIG=# a list of oidc-provider clients for the Neon integration. If not provided, disables Neon integration
STACK_INTEGRATION_CLIENTS_CONFIG=# a list of oidc-provider clients for integrations. If not provided, disables integrations

View File

@ -482,7 +482,6 @@ export const basicAuthorizationHeaderSchema = yupString().test('is-basic-authori
// Neon integration
export const neonAuthorizationHeaderSchema = basicAuthorizationHeaderSchema.test('is-neon-authorization-header', 'Invalid client_id:client_secret values; did you use the correct values for the Neon integration?', (value) => {
if (!value) return true;
console.log("????????????", value, decodeBasicAuthorizationHeader(value));
const [clientId, clientSecret] = decodeBasicAuthorizationHeader(value) ?? throwErr(`Neon authz header invalid? This should've been validated by basicAuthorizationHeaderSchema: ${value}`);
for (const neonClientConfig of JSON.parse(process.env.STACK_INTEGRATION_CLIENTS_CONFIG || '[]')) {
if (clientId === neonClientConfig.client_id && clientSecret === neonClientConfig.client_secret) return true;