mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Merge branch 'general-provision' of github.com:stackframe-projects/stack into general-provision
This commit is contained in:
commit
0fdf9105af
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user