mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Update packages/stack-shared/src/schema-fields.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
2191e1c023
commit
30b4d0016b
@ -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